Can anyone help me, I have written the following code:
$sql = " LOAD DATA LOCAL INFILE
'C:/Xitami/webpages/epdsite/csv/$path'
REPLACE INTO TABLE `$table`
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\r\n'";
$result = mysql_query($sql);
while ($A_R = mysql_fetch_row($result)) {
echo "categoryId = $A_R[0]";
echo "category = $A_R[1]";
}
The $result command is executed but I get an error saying
"Supplied argument is not a valid MySQL result resource"
when trying to execute mysql_fetch_row.
Can anyone help me
$sql = " LOAD DATA LOCAL INFILE
'C:/Xitami/webpages/epdsite/csv/$path'
REPLACE INTO TABLE `$table`
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\r\n'";
$result = mysql_query($sql);
while ($A_R = mysql_fetch_row($result)) {
echo "categoryId = $A_R[0]";
echo "category = $A_R[1]";
}
The $result command is executed but I get an error saying
"Supplied argument is not a valid MySQL result resource"
when trying to execute mysql_fetch_row.
Can anyone help me