ID:               36652
 Updated by:       [EMAIL PROTECTED]
 Reported By:      shadda at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         PDO related
 Operating System: Debian 3.1
 PHP Version:      5.1.2
 New Comment:

What driver are you using with PDO ?
Is it PDO_OCI or PDO_MYSQL or something else?
Did you try CVS snapshot from http://snaps.php.net?


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

[2006-03-08 06:19:42] shadda at gmail dot com

Description:
------------
Using prepared statements causes my script to die, in two ways
depending on how I use them. If I use bindParam() the script dies
silently (no error, no exception thrown, even with PDO::ATTR_ERRMODE
set to ERRMODE_EXCEPTION) and I am unable to output anything (above or
below). When I pass the parameter through PDOStatement::execute(), I
receive the following error:

SQLSTATE[42P18]: Indeterminate datatype: 7 ERROR: could not determine
data type of parameter $1

Reproduce code:
---------------
<?php
//First Example
$query = $db->prepare("select font_name, path from fonts_list where id
= ?");

$query->execute( array($_GET['foo']) );
//Produces error (see above)

//Second example
$query = $db->prepare("Select font_name, path from fonts_list where id
= :id");
$query->bindParam(':id', $id);

$id = $_GET['foo'];
$query->execute();

//Kills the script. No Error. Nothing error log.





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


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

Reply via email to