note 105268 rejected from sqlite3.querysingle by thiago

From: Date: Sun, 07 Aug 2011 00:40:17 +0000
Subject: note 105268 rejected from sqlite3.querysingle by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-182291@lists.php.net to get a copy of this message
Note Submitter: johnwchadwick at gmail dot com ---- 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?

« previous php.notes (#182291) next »