Gossamer Forum
Home : General : Perl Programming :

SQL Error....

Quote Reply
SQL Error....
Hi. I'm just trying to work out if there is a better way to actually catch SQL errors, unlike my code below which just reports there was an error, but doesnt return it.
Code:
if (!$result) { error("Unable to execute query to mySQL Database to get adverts names!", $connection); }
Anyone know of a better way? (BTW: This is PHP)[/size][/font]


Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] SQL Error.... In reply to
Can you set the flag PrintError => 1; with SQL/PHP?

- wil
Quote Reply
Re: [Wil] SQL Error.... In reply to
Ah, just found the mysql_error() feature Tongue Thanks for your help Wil.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!