Mysql fixes

Use JDatabase instead of MySQL queries in menus component