fix rencontres wiki script

This commit is contained in:
mose 2019-09-13 15:56:06 +08:00
parent 475cbf7e8e
commit 3b115d88e0

View file

@ -16,11 +16,12 @@ $db->set_charset("utf8");
function getlist($query) { function getlist($query) {
global $db; global $db;
$result = $db->query($query);
$back = array(); $back = array();
if ($result = $db->query($query)) {
while ($row = $result->fetch_row()) { while ($row = $result->fetch_row()) {
$back[$row[0]] = $row[1]; $back[$row[0]] = $row[1];
} }
}
return $back; return $back;
} }
@ -35,10 +36,10 @@ $data = array(
'passe' => array() 'passe' => array()
); );
$avenir = "select itemId, value from tiki_tracker_item_fields where fieldId=1 and datediff(utc_date(from_unixtime( $avenir = "select itemId, value from tiki_tracker_item_fields where fieldId=1 and datediff(date(from_unixtime(
value)), utc_date(now())) >= -1 order by value asc limit 5"; value)), date(now())) >= -1 order by value asc limit 5";
$passe = "select itemId, value from tiki_tracker_item_fields where fieldId=1 and datediff(utc_date(from_unixtime( $passe = "select itemId, value from tiki_tracker_item_fields where fieldId=1 and datediff(date(from_unixtime(
value)), utc_date(now())) < -1 order by value desc limit 5"; value)), date(now())) < -1 order by value desc limit 5";
function getevents($list) { function getevents($list) {
global $fields; global $fields;