php + mysql: binary arrays

From: Date: Tue, 29 Mar 2005 10:35:02 +0000
Subject: php + mysql: binary arrays
Groups: php.general 
Request: Send a blank email to php-general+get-211769@lists.php.net to get a copy of this message
I am writing a contact manager in php/mysql. I'd like to use a binary array as an efficient way to store information for groups that each contact belongs to eg: Field: 'group': 001010 means that the contact belongs to the second and fourth group. If the array is of type Byte, it should be able to store information about 255 groups. Is php/mysql able to handle this? My specific questions are: What functions set/clear a bit in an array in php? How do you query whether a bit is set in mysql? I hope I've made this clear enough to be followed - I'm not a pro!

« previous php.general (#211769) next »