Initial commit
This commit is contained in:
27
dev.php
Normal file
27
dev.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?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" );
|
||||
?>
|
||||
Reference in New Issue
Block a user