Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45724 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93763 invoked from network); 11 Oct 2009 10:43:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Oct 2009 10:43:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=samuel.roze@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=samuel.roze@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.227 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: samuel.roze@gmail.com X-Host-Fingerprint: 209.85.219.227 mail-ew0-f227.google.com Received: from [209.85.219.227] ([209.85.219.227:51747] helo=mail-ew0-f227.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/B1-18143-EB6B1DA4 for ; Sun, 11 Oct 2009 06:43:11 -0400 Received: by ewy27 with SMTP id 27so3556745ewy.23 for ; Sun, 11 Oct 2009 03:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=E0st5g1PTZzfYzntMpYsCCI9X0ctr/rlPFzpUIbvxOY=; b=oZLBCtgmPArQrikvOTyiNe6sBI95wREm9eyFcnIH6FKUQXBGyI/vYOItM/b0lVHo1C lPPJ2wyn1BOOPmIZepzDDRAH6FXb7BFS8hvhyhqeglK+dkijTrrozlaEKysyll1Fvj7R dxGkWkxWt2/5zItEGZp1F9Dt42TKCvJil2EQM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=jMYZ++YoAg5fO2nx99mP4jJ3sC58r6LH8Z1IreSCGbgCg29lLwSaVnWj3PRHiwWnhw lKG183nVYg5ok3IWbkLMJuThzQ2CKbbkzgEjNAx1Tqwgva4rHvbsqO3icSat8J5awf96 J2t2ZndKwNh7vNj8prYyOMPDnKFyx0FwNeK/E= Received: by 10.211.161.39 with SMTP id n39mr5704441ebo.29.1255257787481; Sun, 11 Oct 2009 03:43:07 -0700 (PDT) Received: from ?192.168.0.10? (lns-bzn-61-82-250-104-152.adsl.proxad.net [82.250.104.152]) by mx.google.com with ESMTPS id 10sm1844610eyd.38.2009.10.11.03.43.05 (version=SSLv3 cipher=RC4-MD5); Sun, 11 Oct 2009 03:43:06 -0700 (PDT) To: Lester Caine Cc: PHP internals In-Reply-To: <4AD0D5CD.6030107@lsces.co.uk> References: <1255038690.10759.9.camel@samuel-laptop> <1255120269.3605.14.camel@samuel-laptop> <1255122734.3605.21.camel@samuel-laptop> <4AD09F8B.1010205@lsces.co.uk> <1255195945.3605.49.camel@samuel-laptop> <4AD0D5CD.6030107@lsces.co.uk> Content-Type: text/plain; charset="UTF-8" Date: Sun, 11 Oct 2009 12:43:25 +0200 Message-ID: <1255257805.3605.58.camel@samuel-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Re: Patch: Use notices in PDO From: samuel.roze@gmail.com (Samuel ROZE) Le samedi 10 octobre 2009 à 19:43 +0100, Lester Caine a écrit : [...] > > It is the case for MySQL and Oracle...so for your mind, we don't have to > > make this option available ? I disagree because PDO want make that PHP > > codes support many Databases and if I want to get this notices on MySQL, > > I can use "SHOW WARNING" but, if my apps is used on PostgreSQL, my query > > will fail ! If I can use PDO::noticeInfo in MySQL and in PostgreSQL, it > > will be great. :-) > > Samuel - the most important thing to note here is that MOST additional > MySQL SQL will fail on Postgres and many other database. PDO does > nothing about the SQL and so while a LOT of projects have switched TO > PDO, the result is LESS compatibility at the SQL level. Two of the > projects I work with have made a switch that now makes them unusable > with Firebird and I've had to switch my own builds BACK to ADOdb simply > to restore the SQL compatibility. People are using PDO, but only with a > single database! There is no consensus yet on making the SQL transparent > to each driver. I agree that for high SQL level, using a simple connexion abstraction isn't sufficient. But PDO is in many cases like a Database abstraction because each Databases supports minimal SQL syntax. For notices, it IS different because they can be wanted by anybody whose codes use PDO... From the novice to the high SQL experience using PDO instead of PHP basic drivers. > > And we have to know that these additional requests will be executed only > > if PDO::ATTR_LOG_NOTICES is turned to 1 ! So user want them... ;-) > > But the actual notices returned WILL be different for each database and > have to be handled separately in each case anyway? Get notices is different on each Database, yeah. That's why we have to develop a basic function which returns notices raised by the Database PDO's driver. ;-)