The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Update Text Field
Hurm, how to update a field of text to add sthg at then end ?
With a INT field, no problem, an update query with field = field + X works perfectly but I want to do this : Code:
$DB_site->query("UPDATE ". TABLE_PREFIX ."password SET users=users & '$bbuserinfo[userid]' WHERE postid='$postid'"); I've tried with + instead of the &, same result, it doesn't work correctly By searchin on mysql.com (thanks Dean :lick: ), I found this function concat_ws but I don't know the exact structure and it doesn't work fine with this : Code:
$DB_site->query("UPDATE ". TABLE_PREFIX ."password SET users=concat_ws(users,'$bbuserinfo[userid],') WHERE postid='$postid'"); It only replace my field with the new userid How can I do this with only one query ?! Thanks by advance |
#2
|
||||
|
||||
Nobody knows ?! :-/
|
#3
|
||||
|
||||
I've found
I just had to use a concat() Code:
$DB_site->query("UPDATE ". TABLE_PREFIX ."password SET users=concat(users,'$bbuserinfo[userid],') WHERE postid='$postid'"); |
#4
|
||||
|
||||
Hehe there you go !
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|