you'll need to put the string received by request into quotes:
$category->fetchRow('category_name = "'.$namecategory.'"');
Regards,
Teuzz
-----Original Message-----
From: Ace Paul [mailto:sales@acewebdesign.com.au]
Sent: Tuesday, November 11, 2008 7:59 AM
To: fw-db@lists.zend.com
Subject: [fw-db] 1054 Unknown column in fetchrow statement
public function bouquetAction(){
$category = new Category();
$namecategory = $this->_request->getParam('bouquet');
echo $namecategory;
$this->view->category =
$category->fetchRow('category_name='.$namecategory);
I am getting the error
exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42S22]:
Column not found: 1054 Unknown column 'Orchids' in 'where clause''
What am I doing wrong here. Been trying to get this working for hours
--
View this message in context:
http://www.nabble.com/1054-Unknown-column-in-fetchrow-statement-tp20434456p2
0434456.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论