The structure is created is located in the header file.
Type: Posts; User: Beckster
The structure is created is located in the header file.
Do I need to even tell it the name of the columns?
Just add the VALUES attribute and then (%s, %s, %s, %s, %s, %s)
How are you parsing out the "," or is it automatically doing that when you do the INSERT. Also the macTS might have different lengths
1196741136,1.01466E+19,00:0F:F7:BE:FF:80,2307,-74,-96,1,177 - .csv file
So I only need one %s, or multiple?
The SQL insert commend doesn't work. The code compiles alright but I'm left with a blinking cursor when I execute the code....
#include <stdio.h>
#include <stdlib.h>
#include <mysql/mysql.h>...
It is important that there are separate fields, also. Its not just passing a string to one field, I need the string separated (which it is by commas) and then put into a fields which I have already...
I agree that it shouldn't be an entire program but my partner says else wise.
Sample code I need to modify
/* Connect to database */
if(!mysql_real_connect(conn, server, user, password,...
#include <stdio.h>
#include <stdlib.h>
#include "csvParse.h";
int parseLine(char line[],csvLine_t *data)
{
char *ptr;
int fieldNum=0;
I can read it in, not sure on how to use "," as the demlimiter and the INSERT command can be used on MYSQL but from there I'm stuck
How do you read in a comma separated file and insert it into a mysql server database?