Re: [PHP] fopen and file dump to a databace...

2003-03-09 Thread Bob Irwin
I would use something like this (assuming you're just going to read the entire file and bung it into the database). Be careful reading large files in, it can fill up PHP's allocated memory resource. I've used this with 4 meg files though, and its worked ok. $fp = file("yourfile.txt"); //This re

Re: [PHP] fopen and file dump to a databace...

2003-03-09 Thread Jimmy Brake
hi mark! i import data all the dang time and this is what i use (more or less) Insert($query); // i use a class for my mysql connections } function csv_parse($data, $separator) { $quote = '"'; $values = array(); $toggle = 0; $len = strlen($data); $count =