ToxicRevolution / CSGORankMeWeb

Web interface for Rank Me CSGO Stat tracking plugin
https://Toxicrevolution.net
MIT License
30 stars 10 forks source link

Change database table #12

Closed szogi1910 closed 7 years ago

szogi1910 commented 7 years ago

Hello Use the kento rankme plugin and my question is how can I get statistics from the server mysql where sql_table has the name rankme_sql_table "rankmedd2"

APet74 commented 7 years ago

Hi Szogi1910, when you upload all the files you should have an install directory too. Go to your sites URL and enter the install directory. You should have something like http://example.com/install, from there you will need to specify the database name: rankem_sql_table, it sounds like your plugin is also using a different table name. If your table the name "rankme" then you are fine. If not you will need to use some sort of text editor like sublime text and do a find and replace for all references to "rankme" in the files for querying that database and change them to "rankmedd2". I am not exactly sure what you are saying in your request. Is the database name rankmedd2 or is that the name of the table. If your database is rankmedd2 and the table inside is rankme then you just need to enter rankmedd2 into the line "Database Name" in the install folder. By default kento's plugin has the table name rankme, the database name is set in the config.

szogi1910 commented 7 years ago

The base table is named rankmedd2. Could you please tell me what file to edit this file

APet74 commented 7 years ago

In control/queryfunctions.php you would need to change all references of 'rankme' to your table name.

On Jun 3, 2017 4:26 AM, "szogi1910" notifications@github.com wrote:

The base table is named rankmedd2. Could you please tell me what file to edit this file

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ToxicRevolution/CSGORankMeWeb/issues/12#issuecomment-305963590, or mute the thread https://github.com/notifications/unsubscribe-auth/AEgumVNe0ByJOHirCpXRrXHg6w7eSvZKks5sASa2gaJpZM4NsNaG .

szogi1910 commented 7 years ago

I've already changed the rankme from this file to rankmedd2. Now I have one more problem with more detailed statistics. Namely, does not show any information after selecting a player profile http://imgur.com/Wrsvur6 http://imgur.com/91M2dyl

kennyLtv commented 7 years ago

Do you have any error logs so maybe we can see what is happening with that?

szogi1910 commented 7 years ago

Unfortunately i do not have any log error. I will add that i am using the kento_rankme plugin - https://forums.alliedmods.net/showthread.php?t=290063

kennyLtv commented 7 years ago

Unfortunately it is very hard to tell you what is wrong without knowing an error. Double check to be sure when you changed the table name that you didn't overwrite something else by accident

APet74 commented 7 years ago

I will take a look at this tonight.

On Jun 4, 2017 5:00 PM, "Kenny Lindelof" notifications@github.com wrote:

Unfortunately it is very hard to tell you what is wrong without knowing an error.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ToxicRevolution/CSGORankMeWeb/issues/12#issuecomment-306070138, or mute the thread https://github.com/notifications/unsubscribe-auth/AEgumW-d43k9XM-3Jx21B1s6FLkGhwZ1ks5sAykFgaJpZM4NsNaG .

szogi1910 commented 7 years ago

The file indicates that all tables have been overwritten https://pastebin.com/iJYeAkvx

APet74 commented 7 years ago

So you sure there is not error_log file in the root directory of the server or in the control/search directory? Also is the page you are trying to use the profile page or the search page?

szogi1910 commented 7 years ago

Only the one I found is referring to as error_log, but there is no mention of the statistics script. - https://pastebin.com/WXkCB0zY

APet74 commented 7 years ago

This is pulled from the webserver? Is this from the directory with your rankme web portal install? A lot of error_logs are generated relative to the page running them. I.E. if searchGrab.php generates an error then the location of the error log would be with that file. Additionally, you could try and add

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

into the searchGrab,php file (if it isn't already, put it at the top wrapped within the <?php ?> tag) and profileGrab.php.

Are you clicking the profile button from the leaderboard or are you searching a steamid?

szogi1910 commented 7 years ago

I have some log error

Warning: Division by zero in /home/xxx/domains/xxxx/public_html/statystyki/dd2mirage/control/queryFunctions.php on line 90 Warning: Division by zero in /home/xxx/domains/xxxx/public_html/statystyki/dd2mirage/control/queryFunctions.php on line 97 Warning: Division by zero in /home/xxx/domains/xxxx/public_html/statystyki/dd2mirage/control/queryFunctions.php on line 105 Warning: Division by zero in /home/xxx/domains/xxxx/public_html/statystyki/dd2mirage/control/queryFunctions.php on line 111

APet74 commented 7 years ago

Does your leaderboard table work?

szogi1910 commented 7 years ago

Yes, the result table works http://project-games.eu/statystyki/dd2mirage/leaderboards.php

APet74 commented 7 years ago

Ok, the problem is in Control/Class.players.php you need to change the database name from rankme to the name of your table. However, I am going to release a master fix to address that because that is a slow and old method of generating the class. You can fix it for now but I will push a new change in the next 5-10 mins (I'll message you here) and all you'll need to do to apply the change is upload 4 or 5 files to your webserver and replace the old ones.

APet74 commented 7 years ago

Hi, sorry, github was down for a few minutes. I changed a pretty decent amount of files, please download a zip of from github and simply upload into your directory and overwrite all files, then you just need to delete the install directory and add in your config a line that says: $table = "rankmedd2mirage";

This should get everything working.

szogi1910 commented 7 years ago

I just checked the changes you made and the statistics work fine when you add them in the config $table = "rankmedd2mirage";

APet74 commented 7 years ago

So is everything working now? Can we close the ticket?

szogi1910 commented 7 years ago

Yes, everything works