note 94873 added to class.sqlite3result

From: Date: Mon, 30 Nov 2009 09:35:09 +0000
Subject: note 94873 added to class.sqlite3result
Groups: php.notes 
Request: Send a blank email to php-notes+get-163395@lists.php.net to get a copy of this message
Since SQLite3Result::numRows is unavailable, use: if ($res->numColumns() && $res->columnType(0) != SQLITE3_NULL) { // have rows } else { // zero rows } Because when there are zero rows: * SQLite3Result::fetchArray will return '1' * SQLite3Result::numColumns will return '1' * Column type for column '0' will be SQLITE3_NULL ---- Server IP: 192.41.40.227 Probable Submitter: 70.90.135.58 ---- Manual Page -- http://www.php.net/manual/en/class.sqlite3result.php Edit -- https://master.php.net/note/edit/94873 Del: integrated -- https://master.php.net/note/delete/94873/integrated Del: useless -- https://master.php.net/note/delete/94873/useless Del: bad code -- https://master.php.net/note/delete/94873/bad+code Del: spam -- https://master.php.net/note/delete/94873/spam Del: non-english -- https://master.php.net/note/delete/94873/non-english Del: in docs -- https://master.php.net/note/delete/94873/in+docs Del: other reasons-- https://master.php.net/note/delete/94873 Reject -- https://master.php.net/note/reject/94873 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#163395) next »