Edit report at https://bugs.php.net/bug.php?id=64844&edit=1

 ID:                 64844
 Updated by:         u...@php.net
 Reported by:        mariusz dot gomse at baobaz dot com
 Summary:            PDO::quote() for mysql driver (wrong apostrophe
                     replacing)
-Status:             Open
+Status:             Not a bug
 Type:               Feature/Change Request
 Package:            PDO related
 Operating System:   Irrelevant
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

The cited bug is an InnoDB server bug. Unrelated to driver.


Previous Comments:
------------------------------------------------------------------------
[2013-05-15 15:57:57] mariusz dot gomse at baobaz dot com

Description:
------------
According to http://bugs.mysql.com/bug.php?id=61656 mysql bug PDO::quote() 
method shouldn't change ' to \' for mysql driver. Should change for ''.

Test script:
---------------
<?php 

$tmp = "Let's go!";
$pdo = new PDO("mysql:host=localhost;initStatements=SET NAMES 
utf8;model=mysql4;type=pdo_mysql;pdoType=;active=1", 'root', '', array());
echo $pdo->quote($tmp);

?>

Expected result:
----------------
'Let''s go!'

Actual result:
--------------
'Let\'s go!'


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64844&edit=1

Reply via email to