0
我花了2个小时只是选择语句。zend select字符串语句
我在做什么错?
public function fetchSpecific($moderatorid = 1)
{
$resultSet = $this->getDbTable()->fetchAll("moderatorid = ".$moderatorid);
$entries = array();
foreach ($resultSet as $row) {
$entry = new Application_Model_Network();
$entry->setId($row->id)
->setName($row->name)
->setModeratorId($row->moderatorid);
$entries[] = $entry;
}
return $entries;
}
这是所有关于这一行:
$resultSet = $this->getDbTable()->fetchAll("moderatorid = ".$moderatorid);
它给我一个错误喜欢这样的:
Message: 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 1
尼斯解释。 +1 – RockyFord 2012-02-28 04:59:30
这救了我的生命.. – Proto 2012-02-28 07:51:52
非常好,很高兴帮助! – drew010 2012-02-28 08:06:15