You are here: Re: Error checking for unique value in database table? « PHP Programming Language « IT news, forums, messages
Re: Error checking for unique value in database table?

Posted by Toby A Inkster on 05/23/07 10:44

Erwin Moller wrote:

> You could of course try to parse your errormessage and look for substrings
> like 'UNIQUE CONSTRAINT VIOLATION' (just an example), but that message
> could very well be different if you switch databases, or upgrade the one
> you use now.

A good compromise is to parse the error message , but in cases where it
can't be recognised, display the error message directly to the user.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 88 days, 18:28.]

The Great Wi-Fi Controversy
http://tobyinkster.co.uk/blog/2007/05/22/wifi-scare/

 

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

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