1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
$sql_insert = 'INSERT into collections(
id_collection,
collection_date,
gateways_id_gateway,
ttn_port,
ttn_count,
ttn_payload_raw,
ttn_m_time,
ttn_m_freq,
ttn_m_modulation,
ttn_m_data_rate,
ttn_m_coding_rate,
collection_created
) VALUES (
"",
"'.$da.'",
"'.$gateway_id.'",
"'.$port.'",
"'.$count.'",
"'.$payload_raw.'",
"'.$m_time.'",
"'.$m_freq.'",
"'.$m_modulation.'",
"'.$m_data_rate.'",
"'.$m_coding_rate.'",
"'.$gmdate.'"
)';
if (!$connect->query($sql_insert) )
{
printf("Erreusr : %s\n", $connect->error);
exit("ERROR while intersting in collection");
}
else
{
$last_collection_id = $connect->insert_id;
echo "collection ".$last_collection_id." inserted<br>";
} |
Partager