diff --git a/cgi-bin/green_house_info_show.c b/cgi-bin/green_house_info_show.c index 7fe0eb4..f9723f4 100644 --- a/cgi-bin/green_house_info_show.c +++ b/cgi-bin/green_house_info_show.c @@ -68,8 +68,8 @@ int main(int argc, char const *argv[]) char query_sql[128] = ""; sprintf( query_sql, - "select temperature, humidity , th_date_time from temp_hum_info;"); // 构建查询 - // "select temperature, humidity , th_date_time from temp_hum_info order by thid desc limit %d offset %d;", limit, (page - 1) * limit); // 构建查询 + // "select temperature, humidity , th_date_time from temp_hum_info;"); // 构建查询 + "select temperature, humidity , th_date_time from temp_hum_info ORDER BY thid DESC LIMIT %d OFFSET %d;", limit, (page - 1) * limit); cJSON *result_array = cJSON_CreateArray(); diff --git a/html/green_house_info_show.html b/html/green_house_info_show.html index 5e457dd..8837690 100644 --- a/html/green_house_info_show.html +++ b/html/green_house_info_show.html @@ -66,17 +66,20 @@ - +