FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » PDO - Cannot retrieve warnings with emulated prepares disabled
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: PDO - Cannot retrieve warnings with emulated prepares disabled [message #183528 is a reply to message #183522] Wed, 30 October 2013 01:01 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 10/29/2013 4:50 PM, Thomas 'PointedEars' Lahn wrote:
> Jerry Stuckle wrote:
>
>> On 10/29/2013 11:22 AM, Thomas Mlynarczyk wrote:
>>> Jerry Stuckle schrieb:
>>>> I could be wrong, but from my experience, the mysql driver has never
>>>> supported prepared statements, while the mysqli driver has always
>>>> supported them. This is why PDO has to emulate the prepared statements.
>
> AISB, that is utter nonsense. “mysql”, “mysqli”, and “pdo_mysql” (the PDO
> driver for MySQL) are *different* drivers (for the *same* *third-party*
> client library) and have no dependency on each other whatsoever.
>

As usual, you have no idea what you're talking about- much less what I'm
talking about.

> Also, while the “mysql” extension does not provide a *convenience API* for
> Prepared +Statements (PS), and it is recommended not to use the “mysql”
> extension at all, you *can* still use PSs with it; they are, after all, part
> of the MySQL statement syntax:
>

Who cares what's recommended? That's not the topic.

> $ php -r '
> mysql_connect("localhost", "…", "…");
> mysql_query("PREPARE stmt1 FROM \"SELECT SQRT(POW(?,2) + POW(?,2)) AS
> hypotenuse\";");
> mysql_query("SET @a = 3;");
> mysql_query("SET @b = 4;");
> $result = mysql_query("EXECUTE stmt1 USING @a, @b;");
> var_dump(mysql_fetch_array($result));'
> array(2) {
> [0] =>
> string(1) "5"
> 'hypotenuse' =>
> string(1) "5"
> }
>
> (Example from
> <http://dev.mysql.com/doc/refman/5.1/en/sql-syntax-prepared-statements.html>)
>

I really don't care what mysql says about the code. I'm writing in PHP
and care what PHP says.

>>> This is what PDO tells me about the driver being used:
>>> PDO::ATTR_CLIENT_VERSION => mysqlnd 5.0.10 - 20111026
>>
>> Ok, so you're using MySQL's driver for PHP 5.4+. That's good; it
>> supports everything.
>
> You have it backwards and utterly wrong on top of that. He is _not_ using
> “MySQL's driver for PHP 5.4+”. He is using PDO_MySQL – a PDO driver for
> MySQL – that accesses a MySQL client library on his system (that has nothing
> to do with PHP) of version 5.0.10. PDO and PDO_MySQL are available since
> PHP 5.0.
>
> Do you understand the difference?
>

Yes, I understand the difference. But obviously you do not.

> And if he is using that older client library to access a MySQL 5._1_ server,
> it is _not_ good. (Even though prepared statements should not be an issue
> then – they are supported since MySQL 4.1 –, but in my experience a MySQL
> version mismatch tends to cause problems.)
>
>
> PointedEars
>

Please continue, Pointed Head. You're ignorance is really a great laugh.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: splitting list into columns
Next Topic: reading files with accents in the filename from PHP
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 17:44:15 GMT 2024

Total time taken to generate the page: 0.04174 seconds