#47009 [NEW]: PDO can't handle commented out lines with bound params

From: Date: Mon, 05 Jan 2009 15:34:09 +0000
Subject: #47009 [NEW]: PDO can't handle commented out lines with bound params
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-132562@lists.php.net to get a copy of this message
From:             andrew at ajohnstone dot com
Operating system: fedora
PHP version:      5.2.8
PHP Bug Type:     PDO related
Bug description:  PDO can't handle commented out lines with bound params

Description:
------------
databaseException: SQLSTATE[HY093]: Invalid parameter number: number of
bound variables does not match number of tokens

Can't handle commented out lines with bound params

Reproduce code:
---------------
SELECT 
  *
FROM 
  mapping_outlets mo
  JOIN media_outlets USING(mapping_outlets_id)
WHERE
  -- mo.mapping_outlets_id = ?
  mo.media_outlets_id = ?
GROUP BY ml.name
ORDER BY NULL
LIMIT 500

Expected result:
----------------
Ignore the commented outline.

Actual result:
--------------
databaseException: SQLSTATE[HY093]: Invalid parameter number: number of
bound variables does not match number of tokens

-- 
Edit bug report at http://bugs.php.net/?id=47009&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        http://bugs.php.net/fix.php?id=47009&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        http://bugs.php.net/fix.php?id=47009&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        http://bugs.php.net/fix.php?id=47009&r=trysnapshot60
Fixed in CVS:                        http://bugs.php.net/fix.php?id=47009&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47009&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=47009&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=47009&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=47009&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=47009&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=47009&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=47009&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=47009&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=47009&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=47009&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=47009&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=47009&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=47009&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=47009&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=47009&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=47009&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=47009&r=mysqlcfg



Thread (6 messages)

« previous php.bugs (#132562) next »