note 95853 deleted from class.sqlite3result by danbrown
| From: | danbrown@php.net | Date: | Mon, 25 Jan 2010 21:54:57 +0000 |
| Subject: | note 95853 deleted from class.sqlite3result by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-165303@lists.php.net to get a copy of this message | ||
Note Submitter: anoni at mouse dot com
----
@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.