Re: Stuck trying to upload and grab file name
| From: | Matijn Woudt | Date: | Wed, 25 Jul 2012 10:41:10 +0000 |
| Subject: | Re: Stuck trying to upload and grab file name | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-48352@lists.php.net to get a copy of this message | ||
On Wed, Jul 25, 2012 at 12:21 PM, Tamara Temple
<tamouse.lists@tamaratemple.com> wrote:
> Brad <nyctelecomm@gmail.com> wrote:
>> Here is where everything stands.. L
>>
>> http://pastie.org/4317155
>
> I feel strange bottom posting, somehow, BUT THAT'S THE RULE
It makes each individual message readable in a human readable order. That's why.
>
> You have never actually shown what your SQL statement is, because:
>
> line 33: echo '$sql';
>
> This will NOT interpolate the sql string. This is why you keep getting:
>
> line 57: array(1) { ["file"]=> array(5) { ["name"]=> string(14)
> "emailsTest.txt" ["type"]=> string(10) "text/plain"
> ["tmp_name"]=> string(14) "/tmp/phpcLtE6W" ["error"]=> int(0)
> ["size"]=> int(61) } } $sqlYou have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use near ''\' LINES
> TERMINATED BY "\r\n" IGNORE 1 LINES' at line 3
>
> See where it says "$sqlYou have" after your vardump of $_FILES?
>
> Change:
> Line 33 to:
> echo $sql.PHP_EOL;
>
> then give it a go.
A quick guess, you probably need double escapes at OPTIONALLY ENCLOSED
BY '\\', like OPTIONALLY ENCLOSED BY '\\\\'
- Matijn