How UPDATE and SELECT at the same time

Posted by xRobot on Stack Overflow See other posts from Stack Overflow or by xRobot
Published on 2010-05-29T08:39:27Z Indexed on 2010/05/29 8:42 UTC
Read the original article Hit count: 178

Filed under:
|
|
|
|

I need to update some rows of the tables and then display these rows. Is there a way to do this with one single query and avoid this 2 query ? :

UPDATE table SET foo=1 WHERE boo=2

SELECT * from table WHERE ( foo=1 ) AND ( boo=2 )

© Stack Overflow or respective owner

Related posts about php

Related posts about database