note 42128 added to function.ociparse

From: Date: Tue, 04 May 2004 12:40:14 +0000
Subject: note 42128 added to function.ociparse
Groups: php.notes 
Request: Send a blank email to php-notes+get-69194@lists.php.net to get a copy of this message
For those that are having trouble with error checking, i have noticed on a lot of sites that people are trying to check the statement handle for error messages with OCIParse. Since the statement handle ($sth) is not created yet, you need to check the database handle ($dbh) for any errors with OCIParse. For example: instead of: $stmt = OCIParse($conn, $query); if (!$stmt) { $oerr = OCIError($stmt); echo "Fetch Code 1:".$oerr["message"]; exit; } use: $stmt = OCIParse($conn, $query); if (!$stmt) { $oerr = OCIError($conn); echo "Fetch Code 1:".$oerr["message"]; exit; } Hope this helps someone. ---- Manual Page -- http://www.php.net/manual/en/function.ociparse.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42128 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42128&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42128&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#69194) next »