Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

'Attributes' field in 'GDN_Discussion' table

What does that mean for 'Attributes' field in GDN_Discussion table? Can I use it with serialize array inside of it to cover some of my rules like Discussion Labels (eg. Read, Unread etc.. for each post)?

Cheers..

Tagged:

Comments

  • x00x00 MVP
    edited November 2012

    you should be able to Gdn_Format::Serialize(), Gdn_Format::Unserialize()

    The reason why it doesn’t get used much is it is easy to add columns, that there isn't additional processing that way.

    You could used it for detailed or specific meta.

    Regarding the User table adding extra columns is not always the best way. Using the UserMeta table, along with the model method is often better. That way you ave something similar to wordpress user meta.

    Note any additional look loop whilst you you are looping the discussion list,etc should be pre-cached, form single query otherwise tit is not very efficient.

    grep is your friend.

  • Attributes would be a fine place to store some additional meta data about a discussion, yes.

  • x00: Great explain.. Yes, u'r right like wordpress user meta. Cheers..

    Lincoln: Thanks. So, I should not add new Field in GDN_Discussion table to handle my rules each discussion.

  • x00x00 MVP
    edited December 2012

    I would do it consistently though. Assume someone else is goign to use it too sore everything you need in you own parameter, and use the built in Serialize/Serialize on associative array.

    grep is your friend.

Sign In or Register to comment.