[Solar-talk] Disturbing Solar_Sql_Select problem
Rodrigo Moraes
rodrigo.moraes at gmail.com
Sun Feb 25 09:51:28 PST 2007
Hi,
I'm a little lost with the exception "Invalid parameter number: no
parameters were bound" which is thrown when the parameter has a single
quote. I'm converting an old database and have a query like this one:
$title = 'TONY HAWK\'s PROJECT 8';
$select = Solar::factory('Solar_Sql_Select');
$res = $select->from('games_game', '*')
->where('title = ?', $title)
->fetch('one');
And, *sometimes yes, sometimes not*, it generates the exception:
...
[pdo_text] => SQLSTATE[HY093]: Invalid parameter number: no
parameters were bound
...
[stmt] => SELECT
games_game.*
FROM games_game
WHERE
title = 'TONY HAWK\'s PROJECT 8'
LIMIT 1
What is wrong with the query above? It's disturbing that it fails only
sometimes, and I thought it could be something related with the
windows PDO driver... but maybe I should do this query differently?
rodrigo
More information about the solar-talk
mailing list