MySQL Forums
Forum List  »  InnoDB

Re: probably an easy question
Posted by: Tyler Hains
Date: May 20, 2005 02:23PM

You can't get a SQL Select statement to give you those results. If you are using it on a page, your best option is to get both city and state, sorted by state, and use a loop with a current_state variable that you use to compare the current row to the previous row, and only output the state if they are different.

Options: ReplyQuote


Subject
Views
Written By
Posted
2873
May 02, 2005 11:09AM
Re: probably an easy question
2087
May 20, 2005 02:23PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.