Posted by Captain Paralytic on 10/04/07 11:58
On 4 Oct, 05:19, "J.O. Aho" <u...@example.net> wrote:
> MattMika wrote:
> > I have an admin page where auth'd users upload a csv file for
> > insertion of email addresses into a unique field in a mySQL DB.
>
> > Using "INSERT IGNORE" how do I track the occurence of an ignore?
>
> You check with mysql_info() after each insert.
>
> --
>
> //Aho
I tend to use mysql_affected_rows(), particularly where I am only
inserting a single record. Then I can easily check the result by:
if (!mysql_affected_rows()) {
//Record was not inserted
}
Navigation:
[Reply to this message]
|