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 #183509 is a reply to message #183508] Tue, 29 October 2013 12:47 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
Thomas Mlynarczyk wrote:

> Thomas 'PointedEars' Lahn schrieb:
>> PHP 5.4.15-1 (cli) (built: May 12 2013 12:17:45)
>> mysql Ver 14.14 Distrib 5.5.33, for debian-linux-gnu (i686) using
>> readline 6.2
>
> PHP 5.4.8
> MySQL 5.1.41
>
> Hm. So it could either be a bug that was fixed in a later version or I
> somehow messed up my local installation.

I presume reading the changelog will tell.

>> PDO::ATTR_EMULATE_PREPARES == false should be the effective default for
>> PDO_MySQL unless you are using an ancient MySQL version (why?) that does
>> not support Prepared Statements.
>
> My MySQL version does support them. Still, PDO's default seems to be
> "on" for the emulation.

Not here; the attribute is not even supported:

$ php -r '
$pdo = new PDO("mysql:host=localhost", "…", "…");
var_dump($pdo->getAttribute(PDO::ATTR_EMULATE_PREPARES));'
PHP Warning: PDO::getAttribute(): SQLSTATE[IM001]: Driver does not support
this function: driver does not support that attribute in Command line code
on line 3
PHP Stack trace:
PHP 1. {main}() Command line code:0
PHP 2. PDO->getAttribute() Command line code:3
bool(false)

<http://php.net/manual/en/pdo.getattribute.php>
<http://php.net/manual/en/ref.pdo-mysql.php>


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
[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 16:43:41 GMT 2024

Total time taken to generate the page: 0.04234 seconds