On Sat, 6 Jul 2002, Patrick Teague wrote:
> $query = "SELECT * " .
>  "FROM Headers LEFT JOIN Pages ON (Headers.Header_ID=Pages.Header_ID) " .
>  "ORDER BY HeaderOrder DESC, Header, PageOrder DESC, PageTitle;";
> Any ideas on optimizing this?  DB stuff doesn't come near the top of things
> I'm good at :)  The other problem is that any pages that end up having no
> Header "disappear", which is a good thing on the menu, but a bad thing on
> the admin pages when you're trying to connect all of them.

SELECT from pages and use LEFT OUTER JOIN if you want to include pages
with no header.


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

Reply via email to