Typing with both fingers.
Status
Offline
Hi all
just a little tech question that I am up struggling over.
I have a database and I am trying to check for a duplicate value in a row before I insert a new row (Its not a unique column). I dont want to go down the select and check route as it takes alot of server load so I am trying to use the mysql_affected_rows function to check for duplicates.
The trouble is that the value is being returned as 0 even if the query matches - I think this is because its not actually updating the row with any new information just literally checking and 'updating' it with the same info.
Does anyone have any ideas? Or am I just overtired and getting confused!!?
ta
Baz
using php5
mysql 4.1
Bookmarks