From:             todd at bluecliff dot net
Operating system: FreeBSD
PHP version:      5.0.5
PHP Bug Type:     PDO related
Bug description:  No documented way for PDO to escape a colon

Description:
------------
There is no documented way to escape a colon in PDO.  I understand that
there may be a new patch to make this optional, however, I would not like
to use the bindParam function, I would just like to escape it outright. 
no number of backslashes seem to work.  This bug hints at the problem,
however, there is no note on how to escape a : (colon):
http://bugs.php.net/bug.php?id=33736&edit=2

Reproduce code:
---------------
// basically just an update on a time field
$sql_query_str = "UPDATE _sif_message_queue SET msg_time_remote='10:53:00'
WHERE message_queue_id=".$this->message_queue_id;
                        $stmt = $appconnection->prepare($sql_query_str);
                        $stmt->execute();

Expected result:
----------------
Query executes successfully

Actual result:
--------------
SQLSTATE[HY093]: Invalid parameter number: no parameters were bound


-- 
Edit bug report at http://bugs.php.net/?id=34861&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34861&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34861&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34861&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34861&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34861&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34861&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34861&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34861&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34861&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34861&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34861&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34861&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34861&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34861&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34861&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34861&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34861&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34861&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34861&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34861&r=mysqlcfg

Reply via email to