Bug #73932 [NEW]: Bind value not working in MySQL GROUP_CONCAT - Separator

From: Date: Sat, 14 Jan 2017 10:18:20 +0000
Subject: Bug #73932 [NEW]: Bind value not working in MySQL GROUP_CONCAT - Separator
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206609@lists.php.net to get a copy of this message
From: sexavet94 at gmail dot com Operating system: Linux PHP version: 7.0.14 Package: PDO MySQL Bug Type: Bug Bug description:Bind value not working in MySQL GROUP_CONCAT - Separator Description: ------------ Hello. There is a bug in PDO's MySQL driver. It is necessary to write SQL query like this: SELECT GROUP_CONCAT( title SEPARATOR '\'' ) FROM tblNews GROUP BY date I bind value to the separator by PDO but it doesn't work. Test script: --------------- <?php // ... $this->connection = new PDO('mysql:host=' . $configurations['host'] . ';dbname=' . $configurations['database'] . '; charset=utf8', $configurations['user'], $configurations['password']); $sth = $this->connection->prepare("SELECT GROUP_CONCAT( title SEPARATOR ? ) FROM tblNews GROUP BY date"); $sth->bindValue(1 , ':'); $sth->execute(); var_dump($sth->fetch()); -- Edit bug report at https://bugs.php.net/bug.php?id=73932&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73932&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73932&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73932&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73932&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73932&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73932&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73932&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73932&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73932&r=support Expected behavior: https://bugs.php.net/fix.php?id=73932&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73932&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73932&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73932&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73932&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73932&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73932&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73932&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73932&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73932&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73932&r=mysqlcfg

« previous php.bugs (#206609) next »