Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

Append data for "text" or "blob" type

Codes here !

Moderators: macek, egami, gesf

Append data for "text" or "blob" type

Postby xyoon » Thu Jul 17, 2003 6:09 am

Hi,

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.


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

Postby 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.
User avatar
swirlee
Moderator
Moderator
 
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back


Return to mySQL & php coding

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.