Append data for "text" or "blob" type

Codes here !

Moderators: macek, egami, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 40
Joined: Fri Jun 27, 2003 10:57 pm

Append data for "text" or "blob" type

Post by xyoon » Thu Jul 17, 2003 6:09 am


I am uncertain on how to append a textfile which is stored in a the database either as a "text" or "blob" type.

Could anyone please help me out with this.

Thank you so much in advance.


User avatar
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Post by swirlee » Thu Jul 17, 2003 6:47 am

If what you're trying to do is append a given string to a field that already has some text in it, then try this:

Code: Select all

   $append = 'Text to append to column1.';
   $query = 'UPDATE table1 SET column1 = CONCAT(column1, ' . $append . ') WHERE ...';

This ought to work. Just remember to fill in your WHERE clause.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests