1
I’m having a hard time making a where
using criteria, I am posting the code I am making and below the error..
Codigo Criteria
$criteria->compare('id',$this->id);
$criteria->compare('data_hora',$this->data_hora,true);
$criteria->compare('arquivo',$this->arquivo,true);
$criteria->compare('caminho',$this->caminho,true);
$criteria->condition="caminho=".$_POST['busca'];
Error Generated
Cdbcommand failed to execute SQL command: SQLSTATE[42000]: Syntax error or access Violation: 1064 You have an error in your SQL syntax; check the manual that Corresponds to your Mysql server version for the right syntax to use near '/home/samba/Administration/scordon/cdgrd/cdgrd.scp' at line 1. The SQL statement executed was: SELECT COUNT(*) FROM
path
t
WHERE path=/home/samba/Administration/scordon/cdgrd/cdgrd.scp (/opt/lampp/htdocs/Yii/framework/db/Cdbcommand.php:543)
You can post the sql generated by this code?
– rray
cannot get to sql, sql functions are generated by Yii framework codes
– user3677610