hello all

i,m trying to open a file mydata.txt ans use the sql commands in it to delete, recreate and repopulate the tables in my db.

my code so far:

//File Open: Read
$myFile = "mydata.txt";
$fh = fopen($myFile, 'r');

//create an array to read the file

//count lines in a file

//print count
print $numlines;

//this is to use mysql commands in the text file

foreach ($array_of_lines as $line) {
$result=@mysql_query($line) || die;

is this ok?

if not any ideas