[PHP] Sort with PHP or SQL?

2002-07-04 Thread Patrick Teague

Hey,

I'm working on a way to pull menus/pages from a database.  Currently I have
this working on 2 levels - Topic headers  actual page titles -  it prints
it out fairly nice  doesn't take long to load.  What I need to do is add a
level between the 2, a sub-header.

I'm running both the apache server  mysql server on the same linux box as
the current load isn't very high.  I'm wondering whether it would be
better/easier to Load all the topic headers into an array, then any possible
sub-headers into a 2nd array, then the pages into a 3rd array (or even into
a multidimensional array?).  Then go through the arrays  match the pages.
Or would it be easier to write 1 huge SQL statement  have the SQL server
run the whole query?

Currently the menu looks like -

bWin Programs/b
  - Anti-Bot
  - Find Ascii
  - Game Pack
bOnline Projects/b
  - Anti-Bot
etc...

I need something more like -

bWin Programs/b
Utils
  - Anti-Bot
  - Find Ascii
Games
  - Game Pack
bOnline Projects/b
  - Anti-Bot
etc...

Patrick



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Sort with PHP or SQL?

2002-07-04 Thread Analysis Solutions

Patrick:

Grouping and sorting is something databases specialize in.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php