Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alphabetising #165

Open
zHostingSolutions opened this issue Mar 25, 2014 · 3 comments
Open

Alphabetising #165

zHostingSolutions opened this issue Mar 25, 2014 · 3 comments

Comments

@zHostingSolutions
Copy link

Hi.

In the next version, would you please make the following where no matter at what period "MySQL Databases," "MySQL Users," and "FTP Accounts" are created, each item will ALWAYS be in alphabetical order to make it easier to find? Thanks.

MySQL Databases Example:
a, b, c instead of b, a, c and so forth, no matter when a user creates the database.

@TGates71
Copy link

This is a good suggestion ;) I thought it was fixed a while back, but I noticed too that it is not. Should be very easy to do too, just need to add ASC at the end of the DB query.

@stokes84
Copy link
Contributor

@TGates71 is right this is pretty easy for someone that has some time to run through the module controllers real quick (or possibly a higher level solution somewhere?).

Fore example in the MySQL Database list @ /etc/zpanel/panel/modules/mysql_databases/code/controller.ext.php on line 41 you have the query...

$sql = "SELECT * FROM x_mysql_databases WHERE my_acc_fk=:uid AND my_deleted_ts IS NULL";

Just toss ORDER BY my_name_vc at the end. ``my_name_vc` is the key here to organize from you can find your key for each module easily using phpMyAdmin if needed. So our finished product that'll we'll want in line 41 is...

$sql = "SELECT * FROM x_mysql_databases WHERE my_acc_fk=:uid AND my_deleted_ts IS NULL ORDER BY my_name_vc";

and boom, you got a sorted list. You can also probably bust out php's asort on this too but MySQL is optimized to do tasks like this.

@zHostingSolutions
Copy link
Author

Package Manager is also not alphabetizing. I think it's the last thing that I recently found. I'm not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants