I use the code:
$data_read=$port_obj->read($buffer);
print "$data_read\n";
The output look like this:
T=3420499518 A=914 B=97 C=49 D=436 E=428 F=863 G=34 H=771 I=214 J=493 K=165
I want to put it in this:
$T,$A,$B,$C,$D,$E,$F,$G,$H,$I,$J,$K
So I can write it to a MySQL database. How do I do it ?
My Database handler :
$query = "INSERT INTO myhouse (T,A,B,C,D,E,F,G,H,I,J,K)
VALUES ($T,$A,$B,$C,$D,$E,$F,$G,$H,$I,$J,$K)";
$query_handle = $connect->prepare($query);
$query_handle->execute();
I like it this way: