|
Posted by Jim Michaels on 11/21/41 11:37
use mysql_escape_string() on your data before doing your INSERT to put it
into the database.
UPDATE will not put new data into the database. it will only UPDATE what is
already there.
mysql_query("INSERT INTO tablename(blobcolumn,column2) VALUES
('".mysql_escape_string($par)."','otherdata')", $link);
if you want to use an UPDATE,
mysql_query("UPDATE tablename SET blobcolumn='".mysql_escape_string($par)."'
WHERE id=$someid", $link);
when you want the data out, use stripslashes() on the output.
"William Young" <info2@educationalstays.com> wrote in message
news:43c105bb$0$10085$ba620dc5@text.nova.planet.nl...
> Hello all,
>
> I want to read the contents of a html file into a blob field in my mysql
> database.
>
> The function $par = file_get_contents($p1);
>
> p1 is the file field. I need the html source code with all the tags to be
> placed into the database by an UPDATE.
>
> It doesnt work somehow, but i dont know what the error is.
>
> Can someone please help me out here?
>
> William
>
>
>
Navigation:
[Reply to this message]
|