BEFORE I START CAN SOMEONE PLEASE TELL ME HOW TO FIND MY QUESTIONS IN THIS FORUM
I am writing a program in PHP which reads a CSV file produced by " Thunderbird email program" and writes an INSERT query to be executed by SQLite3. Typical raw data read from ‘thunderbird.csv’ file with PHP ‘fgets($fh)’ is like;
“US Post Office”,“Gov”,“Gov, US Post Office”,“2082632338”,
Which my program converts to:
INSERT INTO cdata (Headers …)
VALUES (“US Post Office”,“Gov”,“Gov, US Post Office”,“2082632338”, );
And got syntax error about “,”.
I did try using … ,null,null,null,null, in place of , and the query works.
However, I have 1000+ records that need to be processed and I can’t see writing ‘null’ in every blank space by using LibreOffice calc which I did to produce the INSERT query that did work. I think I have missed something along the way. I am switching over from MySql , it’s not easy!!