kopia lustrzana https://github.com/DL7AD/pecanpico9
Fixed SQL error
rodzic
96465f44c1
commit
7747b8bfc7
|
@ -87,7 +87,7 @@ class Tracker {
|
|||
$stmt = Database::getInstance()->prepare("
|
||||
SELECT *
|
||||
FROM position
|
||||
WHERE (
|
||||
WHERE ((
|
||||
:from <= rxtime
|
||||
AND rxtime <= :to
|
||||
AND org = 'pos'
|
||||
|
@ -95,7 +95,8 @@ class Tracker {
|
|||
:from <= gps_time
|
||||
AND gps_time <= :to
|
||||
AND org = 'log'
|
||||
) AND call = :call
|
||||
))
|
||||
AND call = :call
|
||||
ORDER BY rxtime ASC
|
||||
");
|
||||
$stmt->bindValue(':call', $this->call, SQLITE3_TEXT);
|
||||
|
|
|
@ -17,6 +17,9 @@ if(array_key_exists('call', $_GET)) {
|
|||
}
|
||||
|
||||
$range = isset($_GET['range']) && is_numeric($_GET['range']) ? $_GET['range'] : 86400;
|
||||
|
||||
if($tel->rxtime < time() - $range)
|
||||
$range = time() - $tel->rxtime;
|
||||
?>
|
||||
<link href="style.css" rel="stylesheet" type="text/css">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
|
|
|
@ -201,7 +201,7 @@ function loadRecentData() {
|
|||
|
||||
$.each(tel, function(key, data) {
|
||||
|
||||
if(last != null && data['rxtime'] - last > 300) {
|
||||
if(last != null && data['rxtime'] - last > 1210) {
|
||||
dataBattery.addRow([null, null, null, null]);
|
||||
dataSolar.addRow([null, null, null, null]);
|
||||
dataTemp.addRow([null,null,null,null,null,null]);
|
||||
|
|
Ładowanie…
Reference in New Issue