DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   Getting mysql "UNaffected" rows (http://www.daniweb.com/forums/thread92133.html)

roy-- Oct 8th, 2007 9:34 am
Getting mysql "UNaffected" rows
 
Hi,

My php script would do a few updates/inserts to a table. after that I would like the rows that have not been affected by the script to be deleted from the database.

cant figure out how to do this.

any ideas ?

ShawnCplus Oct 8th, 2007 12:02 pm
Re: Getting mysql "UNaffected" rows
 
Well if you are using a condition to select the rows to be inserted/updated just reverse the condition and do a delete on those so if you have something like WHERE name = "bob" just do WHERE name != "bob" aside from reversing a condition I'm not sure there is a way of getting the unaffected rows (hopefully I will be corrected on this)


All times are GMT -4. The time now is 11:37 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC