ID:               33736
 Updated by:       [EMAIL PROTECTED]
 Reported By:      php at sagi dot org
-Status:           Open
+Status:           Feedback
 Bug Type:         PDO related
 Operating System: Linux
 PHP Version:      5.1.0b2
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2005-07-17 20:04:17] php at sagi dot org

Description:
------------
I'm trying to execute a query similar to this:
INSERT INTO table (name, created_at) VALUES (:name,
FROM_UNIXTIME(:created_at)::TIMESTAMP);

On postgres7.4. FROM_UNIXTIME is a custom function, I try to cast its
value to TIMESTAMP using the '::' operator.

However, PDO thinks ':TIMESTAMP' is a name of another parameter, so it
throws this exception: 'SQLSTATE[HY093]: Invalid parameter number:
parameter was not defined'

Perhaps PDO should not treat '::' as a parameter or at least provide a
way to escape ':'.



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


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

Reply via email to