Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18656 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55652 invoked by uid 1010); 2 Sep 2005 18:15:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 55630 invoked from network); 2 Sep 2005 18:15:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2005 18:15:40 -0000 X-Host-Fingerprint: 212.55.154.24 relay4.ptmail.sapo.pt Linux 2.4/2.6 Received: from ([212.55.154.24:58835] helo=sapo.pt) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 3E/38-15098-7C698134 for ; Fri, 02 Sep 2005 14:15:36 -0400 Received: (qmail 3892 invoked from network); 2 Sep 2005 18:15:15 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.158) by relay4 with SMTP; 2 Sep 2005 18:15:15 -0000 Received: (qmail 27407 invoked from network); 2 Sep 2005 18:15:15 -0000 X-AntiVirus: PTMail-AV 0.3-0.86.2 Received: from unknown (HELO pc07653) (nunoplopes@sapo.pt@[81.193.153.214]) (envelope-sender ) by mta8 (qmail-ldap-1.03) with SMTP for ; 2 Sep 2005 18:15:15 -0000 Message-ID: <010101c5afea$4227cd80$0100a8c0@pc07653> To: "PHPdev" Date: Fri, 2 Sep 2005 19:15:11 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Subject: [PATCH] sqlite: retrieve SQL syntax errors From: nlopess@php.net ("Nuno Lopes") Hi, I've made a simple patch to allow a user to retrieve the SQL syntax error occured in either sqlite_exec(), sqlite_query() or sqlite_unbuffered_query(). Untill now this wasn't possible, because sqlite_last_error() doesn't handle SQL syntax errors. The patch adds an additional parameter to those 3 functions (OO and non-OO versions) to retrieve the error. Patch: http://mega.ist.utl.pt/~ncpl/php_sqlite.txt Example: I hope this can enter in PHP 5.1.0, as it is a fairly simple patch. Nuno P.S.: the patch also fixes a bug in the SQLiteDatabase constructor, where the $errorstr variable wasn't filled (because it wasn't beeing passed by reference).