27 lines
694 B
PHP
27 lines
694 B
PHP
<?php
|
|
ini_set('display_errors', '1');
|
|
ini_set('display_startup_errors', '1');
|
|
error_reporting(E_ALL);
|
|
|
|
|
|
include './assets/functions.php';
|
|
include './settings/settings.php';
|
|
include './settings/config.php';
|
|
include './settings/systemfirmware.php';
|
|
|
|
$pdo = dbConnect($dbname);
|
|
$sql = 'SELECT description FROM history where type="CarTest"';
|
|
$stmt = $pdo->prepare($sql);
|
|
//Excute Query
|
|
$stmt->execute();
|
|
//Get results
|
|
$messages = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
|
|
$car_data = [];
|
|
foreach ($messages as $message){
|
|
$car_data[] = json_decode(json_encode($message['description'],JSON_UNESCAPED_UNICODE));
|
|
}
|
|
|
|
print_r($car_data);
|
|
//$grouped = array_group_by($messages, "state", "city" );
|
|
?>
|