note 97445 added to function.oci-num-rows

From: Date: Tue, 20 Apr 2010 09:51:05 +0000
Subject: note 97445 added to function.oci-num-rows
Groups: php.notes 
Request: Send a blank email to php-notes+get-168445@lists.php.net to get a copy of this message
If you want to return te number of rows without fetching all data it might by more efficient to use this code (correct me if I'm wrong): $sql_query = 'SELECT COUNT(*) AS NUMBER_OF_ROWS FROM (' . $your_query . ')'; $stmt= oci_parse($conn, $sql_query); oci_define_by_name($stmt, 'NUMBER_OF_ROWS', $number_of_rows); oci_execute($stmt); oci_fetch($stmt); echo $number_of_rows; ---- Server IP: 213.249.64.162 Probable Submitter: 93.93.121.91 ---- Manual Page -- http://www.php.net/manual/en/function.oci-num-rows.php Edit -- https://master.php.net/note/edit/97445 Del: integrated -- https://master.php.net/note/delete/97445/integrated Del: useless -- https://master.php.net/note/delete/97445/useless Del: bad code -- https://master.php.net/note/delete/97445/bad+code Del: spam -- https://master.php.net/note/delete/97445/spam Del: non-english -- https://master.php.net/note/delete/97445/non-english Del: in docs -- https://master.php.net/note/delete/97445/in+docs Del: other reasons-- https://master.php.net/note/delete/97445 Reject -- https://master.php.net/note/reject/97445 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#168445) next »