note 90884 added to function.oci-bind-by-name
| From: | dawidsomesignkrysiakdottynetdotpl at osu1 dot php dot net | Date: | Thu, 14 May 2009 15:48:14 +0000 |
| Subject: | note 90884 added to function.oci-bind-by-name | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154597@lists.php.net to get a copy of this message | ||
It looks like you don't have to put colon (':') in the beginning of the placeholder
name in the second parameter of ocibindbyname(). Of course colon is still needed in sql content.
The following example works just fine under php 4.4.7:
<?php
$sql = "SELECT * FROM schema.table WHERE id = :id";
$stmt = ociparse($conn, $sql);
ocibindbyname($stmt, 'id', $id, -1); // <-- note 'id' as a 2nd param -
without ':' in the beggining!!!
ociexecute($stmt,OCI_DEFAULT);
// ...
?>
----
Server IP: 82.177.164.100
Probable Submitter: 212.14.58.157
----
Manual Page -- http://www.php.net/manual/en/function.oci-bind-by-name.php
Edit -- https://master.php.net/note/edit/90884
Del: integrated -- https://master.php.net/note/delete/90884/integrated
Del: useless -- https://master.php.net/note/delete/90884/useless
Del: bad code -- https://master.php.net/note/delete/90884/bad+code
Del: spam -- https://master.php.net/note/delete/90884/spam
Del: non-english -- https://master.php.net/note/delete/90884/non-english
Del: in docs -- https://master.php.net/note/delete/90884/in+docs
Del: other reasons-- https://master.php.net/note/delete/90884
Reject -- https://master.php.net/note/reject/90884
Search -- https://master.php.net/manage/user-notes.php