Improved DBMySQLi::query

Improved the function:
- appropriate use of mysqli::fetch_all instead of loop 
- improved checks on the result