Everything works fine on localhost but after i have uploaded to host i get the following error
CDbCommand failed to execute the SQL statement: 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 '' at line 3. The SQL statement executed was: SELECT *
FROM `Image`
WHERE
It looks like its not recognizing the where parameters, but why it does locally but not once I have uploaded to a host
Here is the code that i have in my view that is generating the error
<?php
$rows = Yii::app()->db->createCommand()
->from("Image")
->where(array("types = admin"))
->queryAll();
foreach($rows as $row)
{
$imghtml=CHtml::image(Yii::app()->request->baseUrl.'/images/thumb/'.$row['image']);
echo '<a class = "image" href="'.Yii::app()->request->baseUrl.'/generator/create?image='.$row['image'].'">'.$imghtml.'</a> ';
}
?>