note 38376 added to function.ocifetchinto

From: Date: Thu, 18 Dec 2003 15:39:53 +0000
Subject: note 38376 added to function.ocifetchinto
Groups: php.notes 
Request: Send a blank email to php-notes+get-62179@lists.php.net to get a copy of this message
The use of ocifetchinto() with the OCI_ASSOC parameter is not suitable for queries with aliased columns: the columns' real names, *not* their aliases, are used as keys in the associative array, causing some values to be overwritten. <?php $sql = "select a.id, b.id from ref a, library b where a.id = b.id"; // ...parsed and executed... ocifetchinto($stmt, $row, OCI_ASSOC); /* print_r($row) will return only one value instead of two: Array ( [ID] => 948 ) */ ?> ---- Manual Page -- http://www.php.net/manual/en/function.ocifetchinto.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38376 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38376&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38376&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#62179) next »