Added MySQLi function

Added function for querying the DB.