note 105268 added to sqlite3.querysingle

From: Date: Sat, 06 Aug 2011 02:00:32 +0000
Subject: note 105268 added to sqlite3.querysingle
Groups: php.notes 
Request: Send a blank email to php-notes+get-182274@lists.php.net to get a copy of this message
I don't know if this was intentional or not, so I'll assume it was. If you perform anything other than a SELECT, it will succeed, but it will print out the redundant message: Warning: SQLite3::querySingle() [sqlite3.querysingle]: Unable to execute statement: not an error If you know your query, for a fact, will be valid, you COULD just use PHP's silencing mechanism to get around it. That is: <?php $database->querySingle('INSERT INTO table(row) VALUES ('value')'); ?> would become: <?php @$database->querySingle('INSERT INTO table(row) VALUES ('value')'); ?> I believe the real solution is to use query for this operation, but I don't know why that isn't mentioned, I guess it's implied? The function actually works, so I don't see the point in spitting out that redundant error message... Maybe the message should be changed to something more descriptive? ---- Server IP: 69.147.83.197 Probable Submitter: 96.27.15.96 ---- Manual Page -- http://www.php.net/manual/en/sqlite3.querysingle.php Edit -- https://master.php.net/note/edit/105268 Del: integrated -- https://master.php.net/note/delete/105268/integrated Del: useless -- https://master.php.net/note/delete/105268/useless Del: bad code -- https://master.php.net/note/delete/105268/bad+code Del: spam -- https://master.php.net/note/delete/105268/spam Del: non-english -- https://master.php.net/note/delete/105268/non-english Del: in docs -- https://master.php.net/note/delete/105268/in+docs Del: other reasons-- https://master.php.net/note/delete/105268 Reject -- https://master.php.net/note/reject/105268 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#182274) next »