multiquery or php postprocessing
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!!!
Sorry, only registered users may post in this forum.
© 1995-2008 MySQL AB, 2008- Sun Microsystems, Inc.