i have a huge problem...........
basically i am geting GPS data on my server in the following format, The data is saved in a text file,
Above is EXACTLY how the file.txt looksCode:$KENNY1,run,c7, 4680,,839527 $GPRMC,102503.000,A,2640.1877,S,02756.0048,E,0.1,077.1,080607,,,A*7C $KENNY1,run,b,, 4680,,958585 $GPRMC,102620.000,A,2640.1874,S,02756.0045,E,0.1,104.9,080607,,,A*7D $KENNY1,run,h9, 4680,,839527 $GPRMC,102735.000,A,2640.1850,S,02756.0038,E,0.5,239.9,080607,,,A*7D $KENNY1,run,h5, 4680,,958585 $GPRMC,102853.000,A,2640.1789,S,02756.0004,E,0.5,245.3,080607,,,A*77
Ok, now for the problem,
I need to extract the data from the file and insert it into my DB,
All that is important on the first line is the last number ie:958585 or 839527 (2 different units)
then there are a few fields needed on the second line, But i need to know the number of the unit from the first line so i can associate the second line to the first,
After extracting the data, and inserting it into my DB i would like to delete the line,
Does anyone have any ideas on how i could accomplish this?