1219 Posted May 3, 2008 Share Posted May 3, 2008 I have a list here in static HTML. http://www.donjo.net/where_to_buy.html I have worked on being able to insert store, address, state, URL, phone into a database, however, I am having problems organizing it so that it seperates the stores in the database by State and listing them as in the static version. Thanks Adam Quote Link to comment Share on other sites More sharing options...
IsmAvatar Posted May 3, 2008 Share Posted May 3, 2008 Have you tried ORDER BY? Quote Link to comment Share on other sites More sharing options...
1219 Posted May 3, 2008 Author Share Posted May 3, 2008 I have setup a temp page here: http://www.donjo.net/test/ I am using: SELECT * FROM storeRetailers GROUP BY state ORDER BY state ASC But in the html body it now only shows one store per state instead of them all. Is something wrong with the HTML ia have for state and displaying the address/retailer. Quote Link to comment Share on other sites More sharing options...
IsmAvatar Posted May 3, 2008 Share Posted May 3, 2008 remove the Group By. That's what's killing the results. The Order By will automatically group them, simply because 1 and 1 appear between 0 and 2 :-) Quote Link to comment Share on other sites More sharing options...
1219 Posted May 3, 2008 Author Share Posted May 3, 2008 But i want the states to show only once per. So if Alabama has 3 stores, I only want Alabama listed once. Quote Link to comment Share on other sites More sharing options...
1219 Posted May 3, 2008 Author Share Posted May 3, 2008 Similar to how this site lists its stores: http://www.innerasiarugs.com/storelocator/print.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.