Re: PHP/MySQL and inserting blob data?
| From: | szii at sziisoft dot com | Date: | Thu, 09 May 2002 20:23:52 +0000 |
| Subject: | Re: PHP/MySQL and inserting blob data? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-19088@lists.php.net to get a copy of this message | ||
$escdata = addslashes($data);
UPDATE
Blabla
SET
value = '$escdata'
WHERE...
Make sure you use addslashes, though. It's important.
'Luck
-Szii
----- Original Message -----
From: "Hadmut Danisch" <hadmut@danisch.de>
To: <php-db@lists.php.net>
Sent: Thursday, May 09, 2002 1:06 PM
Subject: [PHP-DB] PHP/MySQL and inserting blob data?
>
> Hi,
>
> can anyone give me a hint how to insert
> random blob data into a MySQL database?
>
> Just a plain query like
>
> update Blabla set value=$data where...
>
> doesn't seem to be the right way, because
> in this case the variable is substituted and
> will crash the sql statement.
>
> regards
> Hadmut
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php