[Vtigercrm-developers] Catch $adb->pquery error?

Alan Lord (News) alanslists at gmail.com
Sat Sep 7 11:20:29 UTC 2013


Hi probably a daft question but I couldn't find any examples in the code 
(or perhaps I wasn't looking properly)...

I've an Event Handler function that creates and adds a UUID to a vtlib 
module entity table. I've set a UNIQUE constraint on the column as it is 
essential all the UUIDs are unique.

I know it's quite unlikely, but I want to check the result of the 
$adb->pquery Update table query to see if the query failed because it 
wasn't unique and repeat until it works...

Anyone got an example of how to check if the $result is an error object?

Cheers

Al


-- 
Libertus Solutions
http://www.libertus.co.uk



More information about the vtigercrm-developers mailing list