Announcement

Collapse
No announcement yet.

mysql query

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mysql query

    this isn't working as I would like. I'm trying to combine several queries into one:
    PHP Code:
    $db->query_write("UPDATE " TABLE_PREFIX "usergroup SET bannercanuse = '0' WHERE usergroupid = '1' LIMIT 1");
    $db->query_write("UPDATE " TABLE_PREFIX "usergroup SET bannercanuse = '0' WHERE usergroupid = '3' LIMIT 1");
    $db->query_write("UPDATE " TABLE_PREFIX "usergroup SET bannercanuse = '0' WHERE usergroupid = '4' LIMIT 1");
    $db->query_write("UPDATE " TABLE_PREFIX "usergroup SET bannercanuse = '0' WHERE usergroupid = '8' LIMIT 1"); 

  • #2
    PHP Code:
    $db->query_write("UPDATE " TABLE_PREFIX "usergroup SET bannercanuse = '0' WHERE usergroupid IN (1, 3, 4, 8)"); 
    Planning to continue using VB 3.8 post EOL? Then join the VB 3.8 Forever group and vB3Forever.org!

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X