note 61466 added to function.sqlite-fetch-object

From: Date: Sat, 04 Feb 2006 12:35:57 +0000
Subject: note 61466 added to function.sqlite-fetch-object
Groups: php.notes 
Request: Send a blank email to php-notes+get-102990@lists.php.net to get a copy of this message
As the sqlite_fetch_object function is not implemented in the PECL extension version 1.0.3. I’ve rewrite the sqlite_fetch_object in PHP : // An empty class class bidon { } // Fetch resultset as an object function sqlite_fetch_object(&$resource){ $arr = sqlite_fetch_array($resource); $obj = new bidon(); foreach ($arr as $key => $value) { # Check is valid $T_VARIABLE if (ereg(\"[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\", $key)) { $obj->$key; } } return $obj; } Voila ---- Server IP: 217.174.203.10 Probable Submitter: 82.238.24.27 ---- Manual Page -- http://www.php.net/manual/en/function.sqlite-fetch-object.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+61466 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61466&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61466&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61466&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61466&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61466&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61466&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61466&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+61466&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#102990) next »