You are here: Re: Ignore track? « PHP SQL « IT news, forums, messages
Re: Ignore track?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация