|
List Info
Thread: Sorting MySQL into categories with loops
|
|
| Sorting MySQL into categories with
loops |
  United States |
2007-06-14 14:39:12 |
Sorry if this has been asked many times before - couldn't
find with a
bunch of searching...
I have one MySQL table (called 'markers') with a list of
cities and
place names. I want to be able to list all of my places, and
have them
sorted by city, eg:
Calgary (city)
-- Place 1 (place)
-- Place 2
-- Place 3
Edmonton
-- Place 1
-- Place 2
-- Place 3
I figured I can do it with 2 queries within 2 loops, but I
figure
there must be a more "proper" way and I'd like to
learn how.
Can anyone give me some guidance? Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development
staff at 360 PSG. An enterprise application development
company utilizing open-source technologies for todays
small-to-medium size businesses.
For information or project assistance please visit :
http://www.360psg.com
You received this message because you are subscribed to the
Google Groups "Professional PHP Developers"
group.
To post to this group, send email to Professional-PHP googlegroups.com
To unsubscribe from this group, send email to
Professional-PHP-unsubscribe googlegroups.com
For more options, visit this group at http:
//groups.google.com/group/Professional-PHP
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: Sorting MySQL into categories with
loops |

|
2007-06-15 00:34:51 |
|
sorry, I did not understand exactly what do you want to do more this would not be a simple one select????
On 6/14/07, Adam < styles gmail.com">
styles gmail.com> wrote: Sorry if this has been asked many times before - couldn';t find with a
bunch of searching...
I have one MySQL table (called 'markers') with a list of cities and place names. I want to be able to list all of my places, and have them sorted by city, eg:
Calgary (city)
-- Place 1 (place) -- Place 2 -- Place 3 Edmonton -- Place 1 -- Place 2 -- Place 3
I figured I can do it with 2 queries within 2 loops, but I figure there must be a more "proper" way and I'd like to learn how.
Can anyone give me some guidance? Thanks in advance.
-- Sem mais para o momento, Rodrigo Souza
-------------------------------------------------------------------------------- :: Rodrigo Souza dos Santos
:: Curitiba - Paraná - Brasil :: rodrigosouzadossantos gmail.com">rodrigosouzadossantos gmail.com --------------------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.
For information or project assistance please visit :
http://www.360psg.com
You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHP googlegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribe googlegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP -~----------~----~----~----~------~----~------~--~---
|
| Re: Sorting MySQL into categories with
loops |

|
2007-06-15 00:40:12 |
|
I forgot, the return would be a vetor and you would list that with foreach()
On 6/15/07, Rodrigo Souza < rodrigosouzadossantos gmail.com">
rodrigosouzadossantos gmail.com> wrote:sorry, I did not understand exactly what do you want to do more this would not be a simple one select????
On 6/14/07, Adam < styles gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
styles gmail.com> wrote: Sorry if this has been asked many times before - couldn';t find with a
bunch of searching...
I have one MySQL table (called 'markers') with a list of cities and place names. I want to be able to list all of my places, and have them sorted by city, eg:
Calgary (city)
-- Place 1 (place) -- Place 2 -- Place 3 Edmonton -- Place 1 -- Place 2 -- Place 3
I figured I can do it with 2 queries within 2 loops, but I figure there must be a more "proper" way and I'd like to learn how.
Can anyone give me some guidance? Thanks in advance.
-- Sem mais para o momento, Rodrigo Souza
--------------------------------------------------------------------------------
:: Rodrigo Souza dos Santos
:: Curitiba - Paraná - Brasil :: rodrigosouzadossantos gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rodrigosouzadossantos gmail.com --------------------------------------------------------------------------------
-- Sem mais para o momento, Rodrigo Souza
-------------------------------------------------------------------------------- :: Rodrigo Souza dos Santos
:: Curitiba - Paraná - Brasil :: rodrigosouzadossantos gmail.com">rodrigosouzadossantos gmail.com --------------------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
This group is managed and maintained by the development staff at 360 PSG. An enterprise application development company utilizing open-source technologies for todays small-to-medium size businesses.
For information or project assistance please visit :
http://www.360psg.com
You received this message because you are subscribed to the Google Groups "Professional PHP Developers" group.
To post to this group, send email to Professional-PHP googlegroups.com
To unsubscribe from this group, send email to Professional-PHP-unsubscribe googlegroups.com
For more options, visit this group at http://groups.google.com/group/Professional-PHP -~----------~----~----~----~------~----~------~--~---
|
[1-3]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|