Posted by DBLEXPOSURE on 11/16/05 18:44
Christian
I got it worked out..
the solution:
mysql_query("LOAD DATA INFILE '/usr/home/wei/dealerinv' INTO TABLE inv
FIELDS TERMINATED BY '\t' ESCAPED BY '\\\' LINES TERMINATED BY '\\n' ") or
die(mysql_error());
"Christian Kirsch" <ck@bru6.de> wrote in message
news:dlevlr$r05$1@news.mind.de...
> DBLEXPOSURE schrieb:
>> What is wrong with this code?
>>
>> mysql_query("LOAD DATA LOCAL INFILE '/usr/home/wei/dealerinv' INTO TABLE
>> `inv` FIELDS TERMINATED BY '\t' ESCAPED BY '\\' LINES TERMINATED BY
>> '\r\n'")or die(mysql_error());
>>
>> It's driving me nuts, It is obviously my quotes, But I can't figure it
>> out...
>>
>> You have an error in your SQL syntax; check the manual that corresponds
>> to
>> your MySQL server version for the right syntax to use near ''' at line 2
>>
>
> Run the code in mysql (the commandline tool). If it works there, you
> have PHP problem. If it doesn't, come back here.
>
> Rationale: Your problem might be due to quoting errors in your string.
[Back to original message]
|