<commit_before><?php

define('USER','root');
define('PASS','');
define('DB','lids');

$requestJSONData = file_get_contents('php://input');

$requestArray = json_decode($requestJSONData,true);

// print_r($requestArray);

$con = mysqli_connect('localhost',USER,PASS,DB);

$uuid = $requestArray["uuid"];
$vehicleid = $requestArray["vehicleid"];
$latitudeE7 = $requestArray["latitudeE7"];
$longitudeE7=$requestArray["longitudeE7"];
$timestampMs=$requestArray["timestampMs"];


$con = mysqli_connect('localhost',USER,PASS,DB);
$sql="INSERT INTO tb_usertrips (UUID,VehicleID,isTripLive,Duration) VALUES('$uuid',$vehicleid,1,0);";
// print($sql."\n");
$result = mysqli_query($con,$sql);
// if($result)
// {
// 	echo 'query successfull';
// }
// else 
// {
// 	echo "query fail";
// }

$tripid = mysqli_insert_id($con);

echo json_encode('{ "tripid": '.$tripid.' }');

mysqli_close($con);<commit_msg>aebgds<commit_after><?php

define('USER','root');
define('PASS','');
define('DB','lids');

$requestJSONData = file_get_contents('php://input');

$requestArray = json_decode($requestJSONData,true);

// print_r($requestArray);

$con = mysqli_connect('localhost',USER,PASS,DB);

$uuid = $requestArray["uuid"];
$vehicleid = $requestArray["vehicleid"];
$latitudeE7 = $requestArray["latitudeE7"];
$longitudeE7=$requestArray["longitudeE7"];
$timestampMs=$requestArray["timestampMs"];


$con = mysqli_connect('localhost',USER,PASS,DB);
$sql="INSERT INTO tb_usertrips (UUID,VehicleID,isTripLive,Duration) VALUES('$uuid',$vehicleid,1,0);";
// print($sql."\n");
$result = mysqli_query($con,$sql);
// if($result)
// {
// 	echo 'query successfull';
// }
// else 
// {
// 	echo "query fail";
// }

$tripid = mysqli_insert_id($con);
$trip = array("tripid"=>$tripid);

echo json_encode($trip);

mysqli_close($con);
{'fraction_non_alphanumeric': 0.22724734785036294, 'fraction_numerical': 0.006700167504187605, 'mean_word_length': 7.413145539906103, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '54813', 'n_tokens_mistral': 680, 'n_tokens_neox': 657, 'n_words': 87}