Invalid parameter number: number of bound variables does not match number of tokens

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2010-01-28T11:34:13Z Indexed on 2010/04/17 13:03 UTC
Read the original article Hit count: 355

Filed under:
|
|

I have a table: 'objects' with few columns: object_id:int, object_type:int, object_status:int, object_lati:float, object_long:float My query is :

$stmt = $db->query('SELECT o.object_id, o.object_type, o.object_status, o.object_lati, o.object_long FROM objects o WHERE o.object_id = 1');
$res = $stmt->fetch();

Pdo throw error: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens When i remove column object_lati or object_long query is work fine.

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about pdo