Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #11637
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail |
|---|---|
| Content-Type | text/plain; charset="UTF-8" |
| Message-ID | <2068453.fuPD5SocO2@PointedEars.de> (permalink) |
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Reply-To | Thomas 'PointedEars' Lahn <php@PointedEars.de> |
| Organization | PointedEars Software (PES) |
| Date | Tue, 29 Oct 2013 21:50:12 +0100 |
| User-Agent | KNode/4.10.5 |
| Content-Transfer-Encoding | 8Bit |
| X-Face | %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v |
| Face | iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg== |
| Subject | Re: PDO - Cannot retrieve warnings with emulated prepares disabled |
| Newsgroups | comp.lang.php |
| References | <l4mohq$9ea$1@news.albasani.net> <12356089.gSGYd4PIy3@PointedEars.de> <l4o9qm$1u3$1@news.albasani.net> <l4obdq$2ra$1@dont-email.me> <l4ojrc$mjc$1@news.albasani.net> <l4p4lj$um3$1@dont-email.me> |
| MIME-Version | 1.0 |
| Lines | 61 |
| NNTP-Posting-Date | 29 Oct 2013 21:50:49 CET |
| NNTP-Posting-Host | 0b3e4406.newsspool4.arcor-online.net |
| X-Trace | DXC=5gZ\9?54G3E[kmHKHnaEnM4IUK<Cl32<A4Fo<]lROoRA8kF<OcfhCOK0bK78=TXjmNDZm8W4\YJNLYUVHKH;GI^GFgT<1=<dKeGDPf02[K_nEC |
| X-Complaints-To | usenet-abuse@arcor.de |
| Xref | csiph.com comp.lang.php:11637 |
Show key headers only | View raw
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.
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:
$ 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>)
>> 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?
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
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
PDO - Cannot retrieve warnings with emulated prepares disabled Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2013-10-28 23:30 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-29 13:10 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Tim Streater <timstreater@greenbee.net> - 2013-10-29 12:23 +0000
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2013-10-29 13:31 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-29 13:47 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2013-10-29 16:26 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-29 19:19 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-29 15:55 -0400
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-29 21:06 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-29 20:57 -0400
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Christoph Michael Becker <cmbecker69@arcor.de> - 2013-10-30 02:59 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-29 22:04 -0400
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-29 08:58 -0400
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2013-10-29 16:22 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-29 16:09 -0400
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-29 21:50 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-29 21:01 -0400
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2013-10-29 23:11 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-10-30 01:12 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2013-10-30 15:38 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Jerry Stuckle <jstucklex@attglobal.net> - 2013-10-29 21:10 -0400
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2013-10-30 15:51 +0100
Re: PDO - Cannot retrieve warnings with emulated prepares disabled Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2013-10-30 21:09 +0100
csiph-web