-- Kexiao Liao <[EMAIL PROTECTED]> wrote
(on Monday, 17 December 2007, 07:23 AM -0800):
> 
> Is there a good way to catch the sql statement execute error message when it
> is been fired?
> 
> For example when I run the following two statements, how can I catch the
> error message if it happens during the running process?
> 
> $stmtNode = $dbDrupal-> query("UPDATE node set title='" . $newName . "'
> WHERE nid='" . $forum . "'");
>  $stmtNode->execute();

Wrap it in a try/catch block.

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to