The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I'm trying to run a SQL query code:
Code:
{
$vbulletin->db->query_write("
UPDATE " . TABLE_PREFIX . "user
SET usergroupid = x
WHERE usergroupid = x");
}
Code:
{
$vbulletin->db->query_write("
UPDATE " . TABLE_PREFIX . "user
SET usergroupid = 10, displaygroupid = 1
WHERE usergroupid = 6");
}
Side question. If anyone has a better idea how to include the code so the usergroup, eg changes are being logged in to the users history through admincp, please let me know. |
|
#2
|
|||
|
|||
|
UPDATE `user` SET `usergroupid`='10', `displaygroupid`='1' WHERE (`usergroupid`='6')
|
|
#3
|
|||
|
|||
|
This appears to be working:
Code:
{
$vbulletin->db->query_write("
UPDATE `user` SET `usergroupid`='10', `displaygroupid`='1' WHERE (`usergroupid`='6')");
}
|
|
#4
|
|||
|
|||
|
Quote:
Leaving any of the columns with any empty value will cause an error |
|
#5
|
|||
|
|||
|
Not all columns accept null/empty values, but you can set a column to empty by just using an empty string as follows: somecolumn = ''
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|