Sort with PHP or SQL?

From: Date: Thu, 04 Jul 2002 11:24:05 +0000
Subject: Sort with PHP or SQL?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-105419@lists.php.net to get a copy of this message
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 - <b>Win Programs</b> - Anti-Bot - Find Ascii - Game Pack <b>Online Projects</b> - Anti-Bot etc... I need something more like - <b>Win Programs</b> Utils - Anti-Bot - Find Ascii Games - Game Pack <b>Online Projects</b> - Anti-Bot etc... Patrick

« previous php.general (#105419) next »