1
未找到列:1054'where子句'中的未知列'total_points'zend框架2 tablegateway select erroring out
protected $ tableGateway;
public function __construct(TableGateway $tableGateway)
{
$this->tableGateway = $tableGateway;
}
public function fetchPoints$transaction_number)
{
$results = $this->tableGateway->select(
array('total_points' => new \Zend\Db\Sql\Expression("sum(points)")),
array('trxnumber' => $transaction_number)
);
return $results[0]['total_points'];
}
它在哪裏試圖讓total_points列從?我認爲積分是列,total_points是alyias。