0
我想为通过邮件地址标识的每个用户添加积分,积分添加到用户每当他做任务,不同点为不同的任务,并需要每天总结所有积分,这是我正在努力的,还有一件事是我在zend上工作的。为每个用户添加积分
public function sumPoint($user_email)
{
$select = $this->getAdapter()->select()
->from('tbl_points', array('sum(points)'))
->where('emailAddress = ?', $user_email)
->order('createdOn DESC');
$totalpoints= $this->getAdapter()->fetchOne($select);
}
我不确定它是否正确请让我知道。
这不行吗? – Rijk
因此,每个用户在db表中都有许多行,每个行都有'points'列中的值?你想要一个特定用户的“点数”值的总和? – ChrisA
不,它返回null – reddy