Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:11034 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11418 invoked by uid 1010); 9 Jul 2004 18:04:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 11394 invoked from network); 9 Jul 2004 18:04:10 -0000 Received: from unknown (HELO mproxy.gmail.com) (216.239.56.249) by pb1.pair.com with SMTP; 9 Jul 2004 18:04:10 -0000 Received: by mproxy.gmail.com with SMTP id w29so6400607cwb for ; Fri, 09 Jul 2004 11:04:09 -0700 (PDT) Received: by 10.11.118.68 with SMTP id q68mr650861cwc; Fri, 09 Jul 2004 11:04:09 -0700 (PDT) Message-ID: <4e89b426040709110429955e72@mail.gmail.com> Date: Fri, 9 Jul 2004 19:04:09 +0100 To: Derick Rethans Cc: PHP Developers Mailing List , Ilia Alshanetsky In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: Subject: Re: [PHP-DEV] SQLite weirdness From: kingwez@gmail.com (Wez Furlong) Stas already came up with a solution for the non-oo api; it probably just needs porting to the oo interface. --Wez. On Fri, 9 Jul 2004 09:06:30 +0200 (CEST), Derick Rethans wrote: > On Thu, 8 Jul 2004, Derick Rethans wrote: > > > After some investigation I found that if I removed the "$ret = " before > > the query() call, then all queries are run just fine, and throw also a > > warning when I put back in the typoes. > > I did some more investigations and it seems that as soon you try to > assign the result of sqlite_query() to a variable it always only execute > the first query in a multi-query query-string. Not only for CREATE as I > wrote before but it's also a problem for multiple INSERTs, or a mixed > INSERT/SELECT. In the code it's the difference between sqlite_compile > (sqlite.c:1472) (used when there is no assignment) and sqlite_exec > (sqlite.c:1559) when there is an assignment. > > A slightly modified "expected" list: > > > > I would have expected something else though: > > 1. Without the "$ret = " it should throw a PHP warning for each broken > > query. (That's current what it's doing). > > 2. With the "$ret = " it should NOT throw any warnings, and set the > > $db->lastError() value accordingly whether there were errors > > (with the last query) or not. > > IMO this should be fixed ASAP, I can perhaps try to come up with a patch > myself too. > > > > regards, > Derick > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >