i am using zend framework. i want to define product name is exist or not if not then insert the product name.
i am using this code in controller
$this->product_tbl = new Application_Model_DbTable_Producttbl();
$product_name = 'mobile';
$productresult = $this->product_tbl->fetchRow($this->product_tbl->select()->where('product_name ='.$product_name));
if(!$productresult){
// do when productresult is null
}
Message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'mobile' in 'where clause'
my question is if product_name
is not found then display a simple message "row is not found"