個repo無見到,我無追post,可唔可以貼出黎?
其實留意下"sector"呢個field
真正submit既簽名, sector=0
我估佢gen假資料既sector係其他數
佢都真係想知實際上有幾多人簽名
$where = '';
if (!is_null($time)) {
$where = ' WHERE dtime<=' . $time;
}
$sql = " select COUNT(id) as total, sector from `" . $this->fzz_table . '` ' . $where;
$query = $this->Query($sql);
$sectors = $fzz->getCountBySector($now);
$now = time();
foreach ($sectors as $val) {
$total += $val;
}
public function getCountBySector($time = null)
{
$where = '';
if (!is_null($time)) {
$where = ' WHERE dtime<=' . $time;
}
$sql = " select COUNT(id) as total, sector from `" . $this->fzz_table . '` ' . $where;
$query = $this->Query($sql);
$rt = array();
while ($row = mysqli_fetch_assoc($query)) {
$rt['sector_' . $row['sector']] = $row['total'];
}
return $rt;
}