look into things like JOIN and SORT BY in MySQL, they're quicker and more efficient 
than PHP for doing DB stuff (so i'm told)

took me awhile to get my head around JOIN, but once you've got it, you'll never be 
without it ;)


"Mark McCulligh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> I have two tables that I want to display together as if they were one table
> and order them by a common date field.
> 
> Because I am using MySQL I can't use the usually way I would do this. Create
> a store procedure or view.
> 
> I was thinking of creating two separate queries in PHP then loading the data
> into one Array. In short loop though both tables copying the records into an
> array.
> 
> Then I was going to sort the Array my a common date field. Then of course
> loop through printing the Array.
> 
> My question is: Is this the best way to do this or is there another way.
> Also how can you sort an Array by one date field.
> 
> Any ideas on how to do link two tables together and sort my a common date
> field.
> 
> Thanks,
> Mark.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 

Reply via email to