[prev in list] [next in list] [prev in thread] [next in thread]
List: php-general
Subject: Re: [PHP] Escaping nasty quotes
From: Matthew Vos <vos () techcomnet ! com>
Date: 2003-07-31 19:54:54
[Download RAW message or body]
On Thu, 2003-07-31 at 14:31, Roy W wrote:
> I have this:
>
> $query = "LOAD DATA LOCAL INFILE '/home/data.txt' INTO TABLE mytable FIELDS
> TERMINATED BY ',' ENCLOSED BY '" . '"' . "' ";
> $result = MYSQL_QUERY($query);
> PRINT "<br>$query2<br>";
>
> The query doesn't take ... but if I cut and paste the printed response into
> the mysql server manually ... works like a charm
>
> :-(
Try this:
$query = "LOAD DATA LOCAL INFILE '/home/data.txt' INTO TABLE mytable
FIELDS TERMINATED BY ',' ENCLOSED BY '\"' ";
It'll get rid of your parse error
Matt
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic