ascii(10) changed to ascii(13) when uploading
| From: | James Brennan | Date: | Mon, 30 Dec 2002 23:19:05 +0000 |
| Subject: | ascii(10) changed to ascii(13) when uploading | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-129719@lists.php.net to get a copy of this message | ||
Just a heads-up.
I was having problems doing a MySql infile insert with a flat file uploaded from an html form. I discovered that ascii character 10 (new line \n,\r) is being changed to ascii character 13 (charriage return) when it is uploaded. MySql didn't recognize the ascii-13 character as a new line and as a result tried to write the remaining data into the last cell of my table.
Also, a quick question. Since PHP can only handle single MySql queries is it better to write data for large insert operations to a temp file and then do an infile insert?
easy,
loop
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963