note 95853 added to class.sqlite3result
| From: | anoni at mouse dot com | Date: | Mon, 25 Jan 2010 21:52:55 +0000 |
| Subject: | note 95853 added to class.sqlite3result | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-165302@lists.php.net to get a copy of this message | ||
@jonscully:
That if condition always evaluated to true for me. In a function checking if there was already a
particular record in the database, I was using
<?php
...
return( ($result->numColumns() && $result->columnType(0) != SQLITE3_NULL) ? true :
false);
}
?>
to indicate whether the record was found (return true) or not found (return false). I changed the
line to
<?php
...
return( ($result->fetchArray() && $result->numColumns() &&
$result->columnType(0) != SQLITE3_NULL) ? true : false);
}
?>
and this works.
----
Server IP: 64.71.164.2
Probable Submitter: 66.252.166.196
----
Manual Page -- http://www.php.net/manual/en/class.sqlite3result.php
Edit -- https://master.php.net/note/edit/95853
Del: integrated -- https://master.php.net/note/delete/95853/integrated
Del: useless -- https://master.php.net/note/delete/95853/useless
Del: bad code -- https://master.php.net/note/delete/95853/bad+code
Del: spam -- https://master.php.net/note/delete/95853/spam
Del: non-english -- https://master.php.net/note/delete/95853/non-english
Del: in docs -- https://master.php.net/note/delete/95853/in+docs
Del: other reasons-- https://master.php.net/note/delete/95853
Reject -- https://master.php.net/note/reject/95853
Search -- https://master.php.net/manage/user-notes.php