Alex
Alex

Reputation: 68036

Flag field in mysql database

Let's say you have a table which stores articles, and each article can have properties, like:

Anyway I was wondering if it's possible to store all this info into a "flags" field, instead of creating multiple fields for each property.

How can I do this in such a way that I can still query my table based on these properties, like SELECT * FROM table WHERE (publish status is "published"), or order them and stuff like that?

Upvotes: 3

Views: 6052

Answers (1)

Emir Akaydın
Emir Akaydın

Reputation: 5823

SET is what you need.

http://dev.mysql.com/doc/refman/5.0/en/set.html

Upvotes: 4

Related Questions