I am currently seeking help on how to get a 10 character data string sent in plain text (thru a serial port link) into a Mysql database. The text consists of the first two characters being an adresss of where the data came from and the last eight characters are the actual data,followed by a char return. I would like to split the string into its two component forms and add them to a seperate column and also add a time stamp and ID_ value
see example below. I have read a few things on boards about fopen: is this the way to go? Any advice will be greatly welcome.
regards mike
miked260772@hotmail.com
example of how the data is formatted and would look like in Mysql:
0312345678[CR]
1523456789[CR]
0312345678[CR]
0312345678[CR]
0972727272[CR]
|ID | address | data | timestamp |
|1 | 03 | 12345678 |time_format|
|2 | 15 | 23456789 |time_format|
|3 | 03 | 12345678 |time_format|
|4 | 03 | 12345678 |time_format|
|5 | 09 | 72727272 |time_format|