Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #15618
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: sql how capture on the fly the row's id when is updated |
| Date | 2015-08-01 14:51 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <mpime6$os0$1@dont-email.me> (permalink) |
| References | <mpi2nt$gpp$1@speranza.aioe.org> |
On Sat, 01 Aug 2015 11:15:52 +0200, alex wrote: > UPDATE a AS a > INNER JOIN c AS c ON a.id = c.id SET a.total = 1 WHERE b.x < c.y > this sql, in the table a total's field, insert the value 1 under certain > conditions; in some rows the value already exists and will only insert > in other lines; > is possible put in an array php only the id of the rows updated? > I think is necessary, while sql loop the rows, when a row is updated, > capture the id and insert in the php array, but how? First of all, forget php for a moment and launch your database interactive shell. I'm not sure which variant of sql you are using, it could be postgres, sqlite, mysql, mariadb or something else. Now figure out how you obtain this information at the database level. then google something like: php <name of db software> <the command you use in the db to get this data> If the database you're using doesn't provide access to this information in a way that you can see it from the interactive shell, it probably doesn't expose it in a way that php cab access it either. p.s. at the moment this appears to be a sql question, not a php one. -- Denis McMahon, denismfmcmahon@gmail.com
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
sql how capture on the fly the row's id when is updated alex <alex@nomailno.it> - 2015-08-01 11:15 +0200
Re: sql how capture on the fly the row's id when is updated Denis McMahon <denismfmcmahon@gmail.com> - 2015-08-01 14:51 +0000
Re: sql how capture on the fly the row's id when is updated "Peter H. Coffin" <hellsop@ninehells.com> - 2015-08-01 10:03 -0500
Re: sql how capture on the fly the row's id when is updated Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-01 20:33 +0200
Re: sql how capture on the fly the row's id when is updated Matthew Carter <m@ahungry.com> - 2015-08-01 15:44 -0400
Re: sql how capture on the fly the row's id when is updated alex <alex@nomailno.it> - 2015-08-01 22:01 +0200
Re: sql how capture on the fly the row's id when is updated Matthew Carter <m@ahungry.com> - 2015-08-01 16:13 -0400
Re: sql how capture on the fly the row's id when is updated alex <alex@nomailno.it> - 2015-08-02 01:51 +0200
Re: sql how capture on the fly the row's id when is updated Matthew Carter <m@ahungry.com> - 2015-08-01 21:38 -0400
Re: sql how capture on the fly the row's id when is updated Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-02 14:42 +0200
Re: sql how capture on the fly the row's id when is updated alex <alex@nomailno.it> - 2015-08-04 19:24 +0200
Re: sql how capture on the fly the row's id when is updated Matthew Carter <m@ahungry.com> - 2015-08-04 14:55 -0400
Re: sql how capture on the fly the row's id when is updated alex <alex@nomailno.it> - 2015-08-05 01:13 +0200
Re: sql how capture on the fly the row's id when is updated Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-04 21:29 +0200
Re: sql how capture on the fly the row's id when is updated alex <alex@nomailno.it> - 2015-08-05 01:01 +0200
Re: sql how capture on the fly the row's id when is updated alex <alex@nomailno.it> - 2015-08-05 01:03 +0200
Address munging considered harmful (was: sql how capture on the fly the row's id when is updated) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-05 10:08 +0200
csiph-web