#49880 [NEW]: mysqli::prepare doesnt accept special chars in field names

From: Date: Wed, 14 Oct 2009 19:38:44 +0000
Subject: #49880 [NEW]: mysqli::prepare doesnt accept special chars in field names
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-143573@lists.php.net to get a copy of this message
From: thiago@php.net Operating system: PHP version: 5.2.11 PHP Bug Type: MySQLi related Bug description: mysqli::prepare doesnt accept special chars in field names Description: ------------ This bug's PHP Version is set to 5.2.11 but that's not true. I cannot upgrade my version from 5.2.6 at the moment. Sorry about this. I was trying to prepare a statement where a field name had a "-" and it was returning (boolean)FALSE. As soon as I updated my database field "e-mail" to "email", and changed my statement to match the field again, it worked like a charm. Reproduce code: --------------- <?php $mysqli = new mysqli('localhost','root','pass'); $mysqli->select_db('test'); $query = "INSERT INTO dummy ( name, e-mail, title, text) VALUES ( ?, ?, ?, ?)"; var_dump($mysqli->prepare($query)); ?> Expected result: ---------------- object(mysqli_stmt) Actual result: -------------- false(boolean) -- Edit bug report at http://bugs.php.net/?id=49880&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49880&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49880&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49880&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49880&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49880&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49880&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49880&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49880&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49880&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49880&r=support Expected behavior: http://bugs.php.net/fix.php?id=49880&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49880&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49880&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49880&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49880&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49880&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49880&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49880&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49880&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49880&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49880&r=mysqlcfg

« previous php.bugs (#143573) next »