Announcement

Collapse
No announcement yet.

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

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

  • $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?

  • #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 , ',' ) , ',X,' , ',' ) )
    Hopefully this helps.

    Comment


    • #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


      • #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...
        X