note 46019 added to function.sqlite-single-query
| From: | franp at free dot fr | Date: | Mon, 27 Sep 2004 00:42:14 +0000 |
| Subject: | note 46019 added to function.sqlite-single-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-77421@lists.php.net to get a copy of this message | ||
AFAIK, you cannot use sqlite-single-query for all kind of SQL queries.
If you are lazy and thought you could safely copy-paste your :
<?php $result = $db->sqlite-single-query($sSQL); ?>
straight from one query to the other, whatever is the query as long as it has only one line, you are
wrong.
Apparently, sqlite-single-query is limited to queries that return data, that is to SELECT queries.
<?php
$sSQL = "DELETE FROM atoms WHERE ID = '8';";
// The following won't work :
$result = $db->singleQuery($sSQL);
// But the following will :
$result = $db->query($sSQL);
?>
----
Manual Page -- http://www.php.net/manual/en/function.sqlite-single-query.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46019
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46019&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46019&report=yes
Search -- http://master.php.net/manage/user-notes.php