!top !toptime not work with mysql


#1

PhantomBot Version (Version and Build Revision from startup): 2.3.8-NB-20170913
OS and Java Version from Startup: Java 1.8.0_65 running on Linux 4.9.35-v7+ (arm)
Browser and Version (for Panel Support):chrome
Stock PhantomBot: Yes
Any Recent Changes to Your System: No
DB: mysql (autoconversion from sqlite)

Description of Issue:
!top and !toptime display only:
set 13 15:02:23 raspberrypi launch-service.sh[10586]: [09-13-2017 @ 15:02:23.292 GMT] 7hemas7er: !top
set 13 15:02:23 raspberrypi launch-service.sh[10586]: [09-13-2017 @ 15:02:23.414 GMT] [CHAT] Top 5 MM:
i have modify scripts/commands/topCommand.js line 40

ORIGINAL var keys = $.inidb.GetKeysByNumberOrderValue
MODIFIED var keys = $.inidb.GetKeysByOrderValue

and now work

thanks for your work
7hemas7er


#2

Interestingly, the NumberOrderValue was added for MySQL. You might want to make sure that your data is still sorted correctly as by default, we were seeing folks with MySQL not having data sorted properly and this change was tested a while back.

I will need to fire up a MySQL instance again and verify, but this change was committed back in July and is in the stable as well.


#3

in my sql all number are Varchar i have change in to integer table point and table time some week ago because not having data sorted

do you have a mysql table structure? i can try to restore to original


#4

PhantomBot stores everything as a String like object (varchar and LONGTEXT) for generic table handling, changing that may cause various unintended consequences. The table structure for everything is:

CREATE TABLE phantombot_" + fName + " (section LONGTEXT, variable varchar(255) NOT NULL, value LONGTEXT, PRIMARY KEY (variable(191)));");

#5

Took a quick break from work:

Will be in the next Nightly and Stable.


#6

Exacpt same build version. !toptime and !top are running fine for me


#7

This topic was automatically closed after 30 days. New replies are no longer allowed.