![]() |
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 |
Nobody knows ?! :-/
|
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'"); |
Hehe there you go :)!
|
All times are GMT. The time now is 01:48 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|