note 46019 deleted from function.sqlite-single-query by cmb

From: Date: Mon, 02 Nov 2020 15:03:24 +0000
Subject: note 46019 deleted from function.sqlite-single-query by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-215760@lists.php.net to get a copy of this message
Note Submitter: franp at free dot fr ---- 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); ?>

« previous php.notes (#215760) next »