|
Posted by Oli Filth on 11/15/97 11:26
sime said the following on 10/09/2005 18:36:
> Hi,
>
> I have a blob field in a mysql database table. I want to copy a blob
> from one record to another. I am having trouble transferring the data
> via a php variable. Maybe I need to addslashes or convert to Hex or
> something. I've tried a few things but can't quite get it. Here is
> simplified code.
>
> mysql_select_db($dbname, $connection);
>
> $query = "SELECT blobthing
> FROM mytable
> WHERE id = 1;";
>
> $results = mysql_query ($query, $connection);
> $row = (mysql_fetch_assoc($result));
> $varblobthing = $row['blobthing']; //put the blob in a variable
>
> $query = "UPDATE mytable
> SET blobthing = ".$varblobthing.",
> WHERE id = 2;";
^
^
You forgot quotes
--
Oli
Navigation:
[Reply to this message]
|