Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45720 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17879 invoked from network); 10 Oct 2009 18:43:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Oct 2009 18:43:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 213.123.20.119 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 213.123.20.119 c2bthomr01.btconnect.com Received: from [213.123.20.119] ([213.123.20.119:15385] helo=c2bthomr01.btconnect.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C0/51-10808-2D5D0DA4 for ; Sat, 10 Oct 2009 14:43:31 -0400 Received: from [10.0.0.5] (host81-138-11-136.in-addr.btopenworld.com [81.138.11.136]) by c2bthomr01.btconnect.com with ESMTP id MCY57542; Sat, 10 Oct 2009 19:43:26 +0100 (BST) X-Mirapoint-IP-Reputation: reputation=Neutral-1, source=Queried, refid=0001.0A0B0302.4AD0D5CD.01B5, actions=tag Message-ID: <4AD0D5CD.6030107@lsces.co.uk> Date: Sat, 10 Oct 2009 19:43:25 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.23) Gecko/20090908 Fedora/1.1.18-1.fc11 pango-text SeaMonkey/1.1.18 MIME-Version: 1.0 To: PHP internals 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> In-Reply-To: <1255195945.3605.49.camel@samuel-laptop> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Junkmail-Status: score=10/50, host=c2bthomr01.btconnect.com X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A0B0207.4AD0D5CF.00E1,ss=1,fgs=0, ip=0.0.0.0, so=2009-07-20 21:54:04, dmn=5.7.1/2009-08-27, mode=single engine X-Junkmail-IWF: false Subject: Re: [PHP-DEV] Re: Patch: Use notices in PDO From: lester@lsces.co.uk (Lester Caine) Samuel ROZE wrote: > Le samedi 10 octobre 2009 à 15:51 +0100, Lester Caine a écrit : >> Ferenc Kovacs wrote: >>>>> Then see how we can do it for the other drivers at the same time. >>>> I'm looking for Oracle. >>>> Is somebody know how we can do for MySQL (and how raise notices with >>>> it) ? >>>> >>> http://dev.mysql.com/doc/refman/5.1/en/show-warnings.html >> Something to consider here is that, like MySQL in this case, many of >> these types of activity ARE now available as SQL queries and so do not >> have to be handled specially by the driver. It is only those areas where >> the results are only available by non-SQL calls that should be added as >> special cases. PDO has no interest in mapping SQL between different >> engines! Carrying out additional SQL calls in the background to emulate >> functions required by other drivers just seems wrong? The Firebird >> engine has been working to move all of the 'service' facilities which >> would normally be handled directly by the driver into simple SQL queries >> to get around this problem from the other end. > > 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. > 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? -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php