Re: Re: Patch: Use notices in PDO
| From: | Samuel ROZE | Date: | Sat, 10 Oct 2009 17:32:25 +0000 |
| Subject: | Re: Re: Patch: Use notices in PDO | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-45718@lists.php.net to get a copy of this message | ||
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. :-)
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... ;-)
> --
> 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
>