Posted on: 07/30/05 07:41pm
By: Thesoko
Is there a way to gracefully handle SQL errors? Specifically, I'd like to have a few columns in my table to be unique, but if someone tries to add a duplicate entry I don't want a big blank nasty page coming, I'd rather have it go back to my data entry page with the values they entered.
Gracefully Handle SQL Errors
Posted on: 07/31/05 05:58am
By: Dirk
Use DB_query(..., 1);
and then use DB_error()
to see if an error occured.
See system/lib-database.php for details.
bye, Dirk