I have IIS running on Windows XP Pro
With PHP and MySQL support
I have a small little PHP script that is supposed to empty a table
and then load a local tab delimited text file into that same table.
After testing the script I found that it deletes the table just like I wanted it to...
BUT...
It doesn't load the text file into the table.
Here's the script:
<?php
// Database Connection
include("dbinfo.inc.php");
$db = mysql_connect("localhost", "$username", "$password");
mysql_select_db($database,$db) or die (mysql_error());
mysql_query("DELETE FROM family");
mysql_query("LOAD DATA LOCAL INFILE 'D:/text/family.txt' INTO TABLE family");
?>
When I use the LOAD DATA LOCAL INFILE command from the mySQL command line I can load the text file with no problem...
My problem is getting the PHP script to do it...
- I also tried removing the word LOCAL from the string but that didn't help.
Is there something wrong with my code or is this some sort of configuration problem?
Help would be appreciated...