note 107983 added to mysqli-result.fetch-all

From: Date: Tue, 20 Mar 2012 10:27:50 +0000
Subject: note 107983 added to mysqli-result.fetch-all
Groups: php.notes 
Request: Send a blank email to php-notes+get-186740@lists.php.net to get a copy of this message
If you really need this function, you can just extend the mysqli_result class with a function like this one. <?php public function fetch_all($resulttype = MYSQLI_NUM) { if (method_exists('mysqli_result', 'fetch_all')) # Compatibility layer with PHP < 5.3 $res = parent::fetch_all($resulttype); else for ($res = array(); $tmp = $this->fetch_array($resulttype);) $res[] = $tmp; return $res; } ?> ---- Server IP: 89.31.146.176 Probable Submitter: 80.70.208.130 ---- Manual Page -- http://www.php.net/manual/en/mysqli-result.fetch-all.php Edit -- https://master.php.net/note/edit/107983 Del: integrated -- https://master.php.net/note/delete/107983/integrated Del: useless -- https://master.php.net/note/delete/107983/useless Del: bad code -- https://master.php.net/note/delete/107983/bad+code Del: spam -- https://master.php.net/note/delete/107983/spam Del: non-english -- https://master.php.net/note/delete/107983/non-english Del: in docs -- https://master.php.net/note/delete/107983/in+docs Del: other reasons-- https://master.php.net/note/delete/107983 Reject -- https://master.php.net/note/reject/107983 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186740) next »