Populating a certain value from a field in an SQL DB
Posted on 2003-03-09
I have a MYSQL database running with a single table named 'users'. In that table I have a field called 'account_status' which can have one of 4 values (0, 1, 2, 5). Anyhow, what I want to do I call a php script to loop through the whole database and return the number of rows (or users) that contain a value of say, 2. Then I would print it to my page saying 'There are 'THIS MANY' users awaiting activation". Really simple question, but I would appreciate a quick answer. Thanks!