= '". $enableDateTime. "'";
if (strcmp($WORK_STATUS, 0) != 0)
{
$sql .= " AND work_status='". $WORK_STATUS. "'";
}
$sql .= " ORDER BY regdatetime;";
$res = pg_query($conn, $sql) or die (pg_last_error(). "
". $sql. "
");
$Ct = pg_num_rows($res);
for($iCount = 0; $iCount < $Ct; $iCount++)
{
$row = pg_fetch_array($res, $iCount);
$lat[$iCount] = $row["lat"];
$lon[$iCount] = $row["lon"];
$w_status[$iCount] = $row["work_status"];
$t_name[$iCount] = $row["terminal_name"];
// $selShipping = "SELECT * FROM qgis.concrete_shipping_record";
// $selShipping .= " WHERE android_id='". $row["android_id"]. "'";
// $selShipping .= " AND record_date >= '". date("Y-m-d 00:00:00"). "'";
// $selShipping .= " AND record_date <= '". date("Y-m-d 23:59:59"). "'";
// $selShipping .= " AND const_id='7'";
// $selShipping .= " AND status='1'";
// $selShipping .= ";";
// $resShipping = pg_query($conn, $selShipping) or die (pg_last_error(). "
". $selShipping. "
");
// $shippingCount = pg_num_rows($resShipping) + 1;
//
// $t_name[$iCount] = $t_name[$iCount]. "[". $shippingCount. "]";
}
//// 搬入累計の計算
//$selShippingTotal = "SELECT * FROM qgis.concrete_shipping_record";
//$selShippingTotal .= " WHERE record_date >= '". date("Y-m-d 00:00:00"). "'";
//$selShippingTotal .= " AND record_date <= '". date("Y-m-d 23:59:59"). "'";
//$selShippingTotal .= " AND const_id='7'";
//$selShippingTotal .= " AND status='2'";
//$selShippingTotal .= ";";
//$resShippingTotal = pg_query($conn, $selShippingTotal) or die (pg_last_error(). "
". $selShippingTotal. "
");
//$shippingTotalCount = pg_num_rows($resShippingTotal);
$lat_php = join(",", $lat);
$lon_php = join(",", $lon);
$w_status_php = join(",", $w_status);
$t_name_php = join(",", $t_name);
?>