Auto Populating a table?
Date: 03/17/06
(PHP Community) Keywords: mysql, browser, sql
I've writen a function
auto_populate($file_name)
{
    $file=file($file_name);
    foreach($file as $sql)
    {
       mysql_query($sql);
       echo $sql."< br >"; // To test the file is being processed
    }
}
if I call it with a filename (eg. auto_populate("test.txt");) I see the lines in the browser but the db still remains empty.
each line is in the format
insert into 'area' values(0, 'Yorkshire')
am I missing something?
Tia
Pual
Source: http://community.livejournal.com/php/427879.html