Thread: Server Motd
View Single Post
  #22 (permalink)   diamond-optic is Special  
Old February 23rd, 2011
diamond-optic's Avatar
diamond-optic diamond-optic is offline
i dont want a goldfish
 
Join Date: March 13th, 2005
Location: Upstate New York
Status: hazey
Posts: 3,259
Default

everytime the motd_query.php is called, it will get the top 10 from the db and save them to the motd_saved.php

I have my stats update every hour, so i have a cron setup calling the motd_query.php file at 15 minutes after every hour.
(for my web server it looks like: php -q /home/user/public_html/avamods/stats/motd_query.php)

This method saves a ton of db queries. As you dont need to get the top10 from the db everytime the motd (or whatever youre using the top10 in) is called when there hasnt been any update to the stats. Its also much faster on a huge/slow stats db
Attached Files
File Type: php motd_query.php (2.1 KB, 6 views)
File Type: php motd_saved.php (403 Bytes, 5 views)

Quote: Originally Posted by ThePowerCosmic in regards to AvaMods
They are the type of people that are absolutely destroying the fabric of america and everything that goodness stands for.

Reply With Quote