note 38730 added to function.ocifetchinto
| From: | cjbj at hotmail dot com | Date: | Mon, 05 Jan 2004 06:12:34 +0000 |
| Subject: | note 38730 added to function.ocifetchinto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-62932@lists.php.net to get a copy of this message | ||
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"
----
Manual Page -- http://www.php.net/manual/en/function.ocifetchinto.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38730
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38730&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38730&report=yes
Search -- http://master.php.net/manage/user-notes.php