hi there...
if i try to INSERT a record to a table that allready exists (according to primary key) i guess the procedure stops.
I am calling my sql querries with PHP...is there a way to be informed that "the record you tried to insert allready exists" ??
thanks in advnace
entry that allready exists
Moderator: General Moderators
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
mysql_affected_rows can be used to check if the row is inserted. If not you have some form of error. You should be able to get this error with mysql_error or mysql_errno.