Skip navigation links

MySQL Forums :: PHP :: multiquery or php postprocessing


Advanced Search

multiquery or php postprocessing
Posted by: paolo xxx ()
Date: November 02, 2009 10:02AM

Hi,
I need to get some records from a mysql table by php.
Once I have the records I need to get each single field and perform a grouping operation to suppress duplicates.
What's the best way for perfomance?
1) perform one query for each field (with the same FROM...WHERE statement) perfoming the grouping in the query
2) perform one single query and get the fielde for grouping managing the php result array


The table:

Cities Streets
new york firstStreet
new york secondStreet
s.francisco firstStreet


What I need:

Cities
new york
s.francisco


Streets
firstStreet
secondStreet


Thanks!!!

Options: ReplyQuote


Subject Written By Posted
multiquery or php postprocessing paolo xxx 11/02/2009 10:02AM
Re: multiquery or php postprocessing Peter Brawley 11/02/2009 10:52AM
Re: multiquery or php postprocessing paolo xxx 11/02/2009 12:05PM
Re: multiquery or php postprocessing Peter Brawley 11/02/2009 02:07PM
Re: multiquery or php postprocessing paolo xxx 11/02/2009 04:53PM
Re: multiquery or php postprocessing Peter Brawley 11/02/2009 08:30PM
Re: multiquery or php postprocessing paolo xxx 11/04/2009 10:27AM
Re: multiquery or php postprocessing Peter Brawley 11/04/2009 11:45AM


Sorry, only registered users may post in this forum.