justcraig Posted February 8, 2007 Share Posted February 8, 2007 Okay so here goes ... I have an online user counter using a mysql database table what im trying to acheive is a listing of online users grouped by country then state however i want it to show only the countries/states that have users online. How best would this be achieved? Link to comment https://forums.phpfreaks.com/topic/37556-listing-from-mysql/ Share on other sites More sharing options...
ultrus Posted February 8, 2007 Share Posted February 8, 2007 Hmm. This is a bit vague, but I imagine a query looking like this: SELECT * FROM users WHERE online = 1 ORDER BY country THEN state This would of course require that the database is updated every time a user is on or timed out/off. I don't know if your application works like this. Good luck on your project. Link to comment https://forums.phpfreaks.com/topic/37556-listing-from-mysql/#findComment-179659 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.