note 38730 deleted from function.ocifetchinto by nlopess

From: Date: Mon, 05 Jan 2004 15:40:00 +0000
Subject: note 38730 deleted from function.ocifetchinto by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62949@lists.php.net to get a copy of this message
Note Submitter: cjbj@hotmail.com ---- Using a slightly different terminology, column aliases *allow* ocifetchinto() to be used with OCI_ASSOC when the query contains "tablename.columnname" notation. Here the aliases "id1" and "id2" have been added to the query from the previous post: <?php $sql = "select a.id id1, b.id id2 from ref a, library b where a.id = b.id"; // ...parsed and executed... ocifetchinto($stmt, $row, OCI_ASSOC); /* print_r($row) gives two columns: Array ( [ID2] => 948 [ID1] => 948 ) */ ?> Column aliases are also useful but not required when the query involves a function, e.g. "select substr(ename, 1, 2) mycol from emp"

« previous php.notes (#62949) next »