-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharray.php
More file actions
50 lines (36 loc) · 1.3 KB
/
Copy patharray.php
File metadata and controls
50 lines (36 loc) · 1.3 KB
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
42
43
44
45
46
47
48
49
50
<?php
include('connect.php');
// modelo do inversor
//==============================================================================================
//$v = ["value1"];
//$v2 = ["value2"];
$val = array();
for($i = 0; $i <= 1; $i++)
{
$val[$i] = $i + 1;
}
for($i = 0; $i<=1; $i++)
{
echo $val[$i] . "<br/>";
}
date_default_timezone_set('America/Belem'); // for other timezones, refer:- https://www.php.net/manual/en/timezones.asia.php
$d = date("Y-m-d");
$t = date("H:i:s");
//echo implode(',', $foo);
$sql = "INSERT INTO tab_teste (value1, value2, date, time) VALUES ('".$val[1]."', '".$val[0]."', '".$d."', '".$t."')";
//$sql = "INSERT INTO tab_teste (value1, value2, date, time) VALUES ('".$val[0]."', '".$val[1]."','".$d."', '".$t."')";
//$sql = "INSERT INTO tab_teste ($v., $v2,, date, time) VALUES ('".$val[0]."', '".$val[1]."','".$d."', '".$t."')";
//$sql = "INSERT INTO tabdados (value1, value2, value3) VALUES ('".$value1."','".$value2."', '".$value3."')";
//
// $INV_ID (string)
// $r_label (string)
// $r_valor (float)
// $debug (string)
$stmt = $PDO->prepare($sql);
if($stmt->execute()){
echo "dados_salvos_com_sucesso";
} else {
echo "erro_ao_salvar";
}
// $var .= $INV_ID . $r_label ....;
?>