note 69079 modified in function.pdo-errorinfo by danbrown

From: Date: Fri, 28 Nov 2008 21:39:14 +0000
Subject: note 69079 modified in function.pdo-errorinfo by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147251@lists.php.net to get a copy of this message
The example code is incorrect. The line that reads: $err = $dbh->prepare('SELECT skull FROM bones'); Will set the value of $err to be boolean FALSE. So, to get a useful error dump change this line: print_r($err->errorInfo()); to: print_r($dbh->errorInfo()); --was-- The example code is incorrect. The line that reads: $err = $dbh->prepare('SELECT skull FROM bones'); Will set the value of $err to be boolean FALSE. So, to get a useful error dump change this line: print_r($err->errorInfo()); to: print_r($dbh->errorInfo()); http://php.net/manual/en/function.pdo-errorinfo.php

« previous php.notes (#147251) next »