$userdata->set('membergroupids', '*');

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nullified
    Member
    • May 2005
    • 38
    • 3.5.0 Pre-Release

    $userdata->set('membergroupids', '*');

    I need to copy the function sql query that updates the field membergroupids in the table user. Where is this sql query/php function located?
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    It is difficult with direct SQL. I recommend parsing the list with PHP if you can.

    John once posted this untested query for removing all users from secondary usergroupid X:

    Code:
    UPDATE user SET membergroupids = TRIM( ',' FROM REPLACE( CONCAT( ',' , membergroupids , ',' ) , ',[color=red]X[/color],' , ',' ) )
    Hopefully this helps.

    Comment

    • nullified
      Member
      • May 2005
      • 38
      • 3.5.0 Pre-Release

      #3
      Thanks for the query example, but that not at all what i'm trying to do. I need to add userid's to the mysql field in this format: 1,2,3,4

      Comment

      • merk
        Senior Member
        • Jul 2001
        • 4149

        #4
        The query is built in the base datamanager class (under save, maybe, not too sure).

        I assume adding "userids to a mysql field" means you're not using membergroupids, just wanting to look how it does it?

        Comment

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