Salutations.
I have a problem with DAO or maybe somewhere else
below is the simplified example from real app
$db = Yii::app()->db;
$command = $db->createCommand('SELECT * FROM `Job` WHERE `sig`=:sig');
$sig = '63732b44ae3f8f40de00ac6c27cc0ae1b7999aeddcea60af04398e806ef0afea';
$command->bindParam(':sig',$sig, PDO::PARAM_STR);
$data = $command->queryRow();
CVarDumper::dump($data, 10, true);
this example doesn’t work. I get “false”.
Examples below work fine
$db = Yii::app()->db;
$command = $db->createCommand('SELECT * FROM Job WHERE sig=\'63732b44ae3f8f40de00ac6c27cc0ae1b7999aeddcea60af04398e806ef0afea\'');
$data = $command->queryRow();
CVarDumper::dump($data, 10, true);
// or
$db = Yii::app()->db;
$command = $db->createCommand('SELECT * FROM `Job`');
$data = $command->queryRow();
CVarDumper::dump($data, 10, true);
I have
-
PHP Version 5.3.2-1ubuntu4.2
-
Yii 1.1 (revision 2225)
Can anyone say me what’s wrong with first example? Or how to find workaround for this problem?
thanks