Go Back   AvaMods 5.o Forums > AvaMods - Server > Server / Mod Support
       Log In
Log In | Lost Password | Register


Server / Mod Support Discuss our servers - Questions, requests, complaints, etc.. Need help with your server? Have any amxx questions/suggestions?

Reply
Views: 2453 - Replies: 22  
Share LinkBack Thread Tools
  #21 (permalink)  
Old February 23rd, 2011
occasional visitor
 
Join Date: February 19th, 2007
Status: No Status
Posts: 10
Question

Quote: Originally Posted by diamond-optic View Post
umm here's mine


idk if its the right one tho, it doesnt read the db directly each time the file is called. I have another file that gets the db entries (set up via a cron to run after each stats update) and it saves the top 10 players to another file.. Then this file just reads the entries that are saved in that other file

Thanks D-O, this is harder than i remember. The motd.top10.php is now showing nicely in the MOTD, HOWEVER the boxes are not populated.

I noticed you said you have another file which actually grabs the DB entries. how would i go about generating this other file?.

Thanks for your time and patience.

Ba5ic
Reply With Quote
  #22 (permalink)   diamond-optic is Special  
Old February 23rd, 2011
diamond-optic's Avatar
i dont want a goldfish
 
Join Date: March 13th, 2005
Location: Upstate New York
Status: hazey
Posts: 3,258
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
  #23 (permalink)  
Old February 23rd, 2011
occasional visitor
 
Join Date: February 19th, 2007
Status: No Status
Posts: 10
Default

Thanks D-O, Ur a star !!!

Only problem, my cronjob won't run, don't know if its because its in the public_html folder?, all permissions are correct. May try putting the motd_query.php next to the stats.pl, i know that runs and updates the stats.

I ran the motd_query.php just by navigating to the page --> MOTD Top Ten Updated Successfully. At least top10 are showing now .

Thanks again.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 05:21 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.