how can i put this condition with this?

any wrong here?

$reference ="BUMW4927"

$criteria=new CDbCriteria;

$criteria->select=’*’;

$criteria->condition="reference = $reference";

All columns will be selected by default.

Syntax should be




$criteria->condition='reference = "' . $reference . '"';



For user supplied data you should consider using parameter binding.

/Tommy

Thank you, is work for me, :rolleyes: