The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
sql error in ... membergroupids like *8*
hi all,
i need to run this sql command for my vB forum: UPDATE vb3_user SET options=options+512 WHERE !(options & 512) && membergroupids like *8* the update has hit all users with membergroupids ( a string ), which contains at least one char '8', but saying the truth i know no thing about sql, could anyone correct my mistake in membergroupids like *8* syntax? Many thx. |
#2
|
|||
|
|||
[sql]AND membergroupids LIKE '%8%'[/sql]
Keep in mind however that this would also select members who are in group 18. |
#3
|
|||
|
|||
thx Marco!
at this moment the command will run perfectly, but soonly we will have a group with groupid = 18. What I have to do? I only need to run sql command for all users who are members of group 8? membergroupids = 8 => update membergroupids = 11,8,12 => update membergroupids = 18,11,12 => NOT update |
#4
|
|||
|
|||
Try with the following (try it first with a select statement to see if it is selecting the correct groups):
[sql]AND (membergroupids LIKE '8%' OR membergroupids LIKE '%,8%')[/sql] I think you wont have any problems then unless you have a usergroup 80. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|