Hello,
I have a txt file of the following format:
315151,34.56,1,1,54442221,23344445
512512,12.54,1,1,23444442,45612345
I am using the following code to parse it and it works:
while( fgets( output,sizeof(output) ,file) != NULL ){
i=0;
token[i] = strtok(output,",");
while( token[i] != NULL){
i++;
token[i] = strtok (NULL, ",");
}
dec2bin(atol(token[4]),binaryBefore);
dec2bin(atol(token[5]),binaryAfter);
dec2bin is a function that convert last two numbers into binary and also working.
But i want to insert this data into mySQL using: token[0].token[1],token[2],token[3],binaryBefore,binaryAfter.
Any one could help with any function or something?
cheers