|
Posted by moosus on 09/26/06 23:49
MS
Sorry 4 the delay in getting back to you.
I actually have done a change in logic.
Due to the slackness of my host in providing me with a MySQL install which
can do everything I want in one hit, I have attacked it in multiple stages.
Page one = 3 select statements getting the top 10 data from each of the
other 3 tables, then writing it to a new table.
Page two = 1 select statement selecting the top 10 of the 30 stored in the
new table.
I have put a timer on page 2 so that is the contents of the new table are
over 24hrs old it runs page one (to try and reduce the load on the db)
Thanks for all your help
Cheers
moosus
in article w7GdnWw-b_besY7YnZ2dnUVZ8tKdnZ2d@bt.com, MS at MS@nospam.com
wrote on 22/9/06 10:17 AM:
>
> "moosus" <junk{@}fishingmonthly.com.au> wrote in message
> news:C1394795.8A00%junk{@}fishingmonthly.com.au...
>> MS
>>
>> My problem is that I am on Ver3.23.37 of MySQL which like VIEWS doesn't
>> support UNION's
>>
>
> Sorry about that... must have missed the part where you mentioned the Ver.
>
> Just to clarify... in Ver3.23.37 of MySQL do they have the SELECT
> Statement??? just kidding.. i presume they do...lol
> Try this to sort your Array
>
> <?php
> //The "name" literal is the name of the key you want to sort on
>
> if(is_array($Myarray)){
> usort($Myarray, "ArraySortOnKey");
> }
>
> // Myarray is now sorted on the "name" Key.
>
> // Sorts multi-dimensional array on Name
> function ArraySortOnKey($a, $b) {
> return strnatcasecmp($a["name"], $b["name"]);
> }
> ?>
>
> Best Wishes
> MS
>
> ----------------------------------------------------------------------------
> Join MyClubWeb.co.uk - The Home of Club Websites and Medium to Small
> Businesses.
> ----------------------------------------------------------------------------
>
>
Navigation:
[Reply to this message]
|