Forums
This topic is locked
Append to end of longblob entry
Posted 11 Aug 2006 13:51:09
1
has voted
11 Aug 2006 13:51:09 Greg Asher posted:
Is it possible to update a recordset with only adding text to the end of a longblob entry. Instead of showing the whole diary entry a little 10 character text field will submit to add on to the end of an alreadly existing paragraph.Thanks
G.
Replies
Replied 16 Aug 2006 11:22:19
16 Aug 2006 11:22:19 Roddy Dairion replied:
Sure can just basically how i would do it. Retrieve, the longblob entry from your table for e.g.
<pre id=code><font face=courier size=2 id=code>
$select = mysql_query("select fieldname from tablename where id = ".$id);
$row = mysql_fetch_array($select);
$addtoblob = $row['fieldname']." ".$newblob;
$update = mysql_query("update tablename set fieldname = '$addtoblob' where id = ".$id);
</font id=code></pre id=code>
And thats it.
Edited by - roders22 on 16 Aug 2006 11:22:45
Edited by - roders22 on 16 Aug 2006 11:23:23
<pre id=code><font face=courier size=2 id=code>
$select = mysql_query("select fieldname from tablename where id = ".$id);
$row = mysql_fetch_array($select);
$addtoblob = $row['fieldname']." ".$newblob;
$update = mysql_query("update tablename set fieldname = '$addtoblob' where id = ".$id);
</font id=code></pre id=code>
And thats it.
Edited by - roders22 on 16 Aug 2006 11:22:45
Edited by - roders22 on 16 Aug 2006 11:23:23