public function getData() { global $db, $res; dbc(); //分组序列号; $jk_sn = "6910001582"; //当日分区数据; $partName = get_param("partName"); if (empty($partName)) { //$partName = "jk_data" . date("Ymd"); $partName = "jk_data20201113"; } $sql = "select jk_date,jk_time,jk_sn,jk_serialnum from " . $db->table('data') . " PARTITION (" . $partName . ") WHERE 1 = 1"; $sql .= " AND jk_sn =" . $jk_sn; $sql .= " LIMIT 10"; $row = $db->queryall($sql); $res["data"] = $row; die(json_encode_lockdata($res)); }
API接口前端传参;
Done !