Hi there,
I currently have a script that queries 2 tables in SQL, pulls the data and then using an array, sorts the data by date and displays the content in the correct order (Latest action 1st).
This is working fine... but... I want to know if there is a better way to do this (improve performance/use less memory/increase speed) as this is called a LOT being as it's used on the home page.
Thanks a lot!
Regards,
I currently have a script that queries 2 tables in SQL, pulls the data and then using an array, sorts the data by date and displays the content in the correct order (Latest action 1st).
This is working fine... but... I want to know if there is a better way to do this (improve performance/use less memory/increase speed) as this is called a LOT being as it's used on the home page.
Code:
krsort($data);
foreach ($data AS $time => $action)
{
echo " {$action} <br />\n";
}
Thanks a lot!
Regards,
Comment