The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
mysql query: concatenating onto an existing field
Lets say I have the field table.field of type mediumtext that already contains a string value. I want to add to the value of the field by concatenating another string on the end of the existing string.
Is there a special query to do this or do I need to concatenate in PHP and then do a regular UPDATE query? thx |
#2
|
||||
|
||||
I think you can use the MySQL function CONCAT. Straight from the manual:
http://dev.mysql.com/doc/mysql/en/String_functions.html |
#3
|
||||
|
||||
so in short:
[sql]UPDATE table SET field = CONCAT(field, 'additional string')[/sql] |
#4
|
||||
|
||||
thx :cheeky:
|
#5
|
||||
|
||||
you're welcome Jake
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|