![]() |
Help?
Too tired, can't think :D
Code:
update user set membergroupids=concat_ws(',', 'A', membergroupids) WHERE userid = 'X' |
I don't think you can do that in a query, you'd have to pull the info out, parse it in php and then update.
|
If you can explain what you're trying to do maybe we can help a little easier :)
|
Ah ok Dean, basically i've made/making a membergroupid leaders and i want the leader to beable to add/remove members from there squad. But i can't work out how to remove a user from membergroupid's.
Im just wondering if there is a mysql query to remove a number from the membergroupid column. |
Ok after looking into it there's really no easy way of doing it with MySQL. What i'd suggest doing is rebuilding the list using PHP. Explode the commas, find the usergroupid in the array, remove it, rebuild array using implode and then updated.
|
All times are GMT. The time now is 09:35 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:
|