Posted by NC on 05/20/06 19:23
korndragon@gmail.com wrote:
>
> Done. Now how do I use checking for the duplicate key
> to display the error?
Run the INSERT IGNORE query and then call mysql_affected_rows(). If it
returns 1, the addition has taken place. If it returns 0, the record
was not added and therefore was duplicate...
Cheers,
NC
Navigation:
[Reply to this message]
|