On Wed, Sep 17, 2003 at 08:01:07AM -0700, Scot Campbell wrote: > Let me rephrase. I insert a row and recieve a 1062 error (Key violation). > How do I determine, at run-time, which of the 3 possible columns has the > error. I guess I could parse the mysql_error message string. But, that > seems likely to change in the future. Or, I can test each column for > uniqueness via individual selects before I issue the insert.
Unless it's an exceptionally common problem, I'd run the INSERTs and go to all that extra work only when it fails. Jeremy -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! <[EMAIL PROTECTED]> | http://jeremy.zawodny.com/ MySQL 4.0.15-Yahoo-SMP: up 3 days, processed 146,116,959 queries (440/sec. avg) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]