Re: [PHP-DB] newbie: MySQL importing data from a variable

2001-03-12 Thread Miles Thompson
Gavin. Try this - put a counter in you loop, and echo the counter along wiht $file. I would wager that your last value for file is "". (I didn't carefully check your logic.) More to the point, you aren't accumulating the file names in $file. As an experiment, try adding $filelist ,= $file; be

Re: [PHP-DB] newbie: MySQL importing data from a variable

2001-03-12 Thread Indrek Järv
Hi Gavin. Maybe this help You :) file: import.php "; exit; } mysql_select_db($my_database, $db); } $dh = dir('/home/httpd/html'); while ($entry = $dh->read()) { if (preg_match('/\.sql$/i', $entry)) { $matching[] = $entry; } } for ($j=0; $j 100) { echo "#"; $nr = 0

[PHP-DB] newbie: MySQL importing data from a variable

2001-03-12 Thread Gavin Tong
Hi, I've been trying to get this script to read a directory and then pass the information into a Mysql table. I can open the directory and print it's contents, or I can get other information from variables passed to the mysql table, but I can't seem to do both. If you have any idea what I've