Re: Querying a database for 50 users' information: 50 queries or a WHERE array?

From: Date: Tue, 13 Sep 2011 18:31:49 +0000
Subject: Re: Querying a database for 50 users' information: 50 queries or a WHERE array?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-314803@lists.php.net to get a copy of this message
Another theoretical approach, given the grey areas, would be to add a field to your table to indicate these "special" users. I would call the field "is_awesome" and have it default to zero, because that's just the way it is. Then you can make your query "SELECT * FROM users WHERE is_awesome=1". This method might make the code a bit more manageable as you could modify the users through a CMS rather than updating a hardcoded array. Marc

« previous php.general (#314803) next »