Jump to content

[SOLVED] Storing and retrieving string of data?


L

Recommended Posts

Hey,

What I mean is that a mod wants to be a mod of sections 1 and 2 how can I make it so I can retrieve those two and compare it with the forums they're in to see if they can have mod powers or not?

 

I just need to know how I can store a set of data in the table so I can retrieve it like

1,2(meaning he's a mod of sections 1 and 2)

 

Thanks

Link to comment
Share on other sites

The "right" way to do it is to store one row for each forum that is moderated.  This can be in a separate table indexed by user id, instead of duplicating entire rows from your users table.

 

But you an also store it as a text string like "1,2", and use implode() to store the data and explode() to read it.  As long as one person doesn't moderate more than 10 or so forums, this method will be quite efficient.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.