note 89074 added to function.oci-bind-by-name

From: Date: Fri, 20 Feb 2009 11:54:20 +0000
Subject: note 89074 added to function.oci-bind-by-name
Groups: php.notes 
Request: Send a blank email to php-notes+get-150887@lists.php.net to get a copy of this message
Dont forget the 5th parameter: $type. It's will slowly your code some times. Eg: <?php $sql = "select * from (select * from b xxx) where rownum < :rnum"; $stmt = OCIParse($conn,$sql); OCIBindByName($stmt, ":rnum", $NUM, -1); OCIExecute($stmt); ?> Below code was slow 5~6 time than not use bind value.Change the 3rd line to: <?php OCIBindByName($stmt, ":rnum", $NUM, -1, SQLT_INT); ?> will resloved this problem. This issue is also in the ADODB DB class(adodb.sf.net), you will be careful for use the SelectLimit method. ---- Server IP: 222.73.227.205 Probable Submitter: 218.85.72.1 ---- Manual Page -- http://www.php.net/manual/en/function.oci-bind-by-name.php Edit -- https://master.php.net/note/edit/89074 Del: integrated -- https://master.php.net/note/delete/89074/integrated Del: useless -- https://master.php.net/note/delete/89074/useless Del: bad code -- https://master.php.net/note/delete/89074/bad+code Del: spam -- https://master.php.net/note/delete/89074/spam Del: non-english -- https://master.php.net/note/delete/89074/non-english Del: in docs -- https://master.php.net/note/delete/89074/in+docs Del: other reasons-- https://master.php.net/note/delete/89074 Reject -- https://master.php.net/note/reject/89074 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#150887) next »