I'm having trouble performing where
using criteria, I'm posting the code I'm doing and below the error ..
Criteria Code
$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 / Admin / scordon / cdgrd / cdgrd.scp (/opt/lampp/htdocs/yii/framework/db/CDbCommand.php:543)