Getting mysql "UNaffected" rows

Reply

Join Date: Sep 2007
Posts: 25
Reputation: roy-- is an unknown quantity at this point 
Solved Threads: 0
roy-- roy-- is offline Offline
Light Poster

Getting mysql "UNaffected" rows

 
0
  #1
Oct 8th, 2007
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 ?
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 1,383
Reputation: ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light ShawnCplus is a glorious beacon of light 
Solved Threads: 217
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: Getting mysql "UNaffected" rows

 
0
  #2
Oct 8th, 2007
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)
GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC