Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9833 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56673 invoked by uid 1010); 13 May 2004 13:26:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 56628 invoked from network); 13 May 2004 13:26:00 -0000 Received: from unknown (HELO mail.zend.com) (192.117.235.230) by pb1.pair.com with SMTP; 13 May 2004 13:26:00 -0000 Received: (qmail 4458 invoked from network); 13 May 2004 13:25:59 -0000 Received: from shire.zend.office (10.1.2.140) by int.zend.com with SMTP; 13 May 2004 13:25:59 -0000 Date: Thu, 13 May 2004 16:25:59 +0300 (IDT) X-X-Sender: frodo@shire.zend.office To: PHP Development Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: SQLite API deficiency From: stas@zend.com (Stanislav Malyshev) I have discovered that SQLite function sqlite_query runs sqlite_exec function if it's return value is used and sqlite_compile/sqlite_step combo if return value is used. I think this is a problem - if I want to run some pack of queries (like, create whole DB schema in one call), I can do it with sqlite_query - but only if I don't check the return value - and thus don't know if it succeeded or not! If I check the return value, it runs sqlite_compile/sqlite_step, which can not run multiple SQL statements. I think this should be fixed. In order not to break BC, I propose to add new function to SQLite API - sqlite_exec, which - surprise! - would always call sqlite_exec and would return only true/false. Though, the even better solution would be to kill that return_value_used check altogether and use two separate functions always, depending on the task. Any thoughts about this? -- Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115