public function query(string $q): \PDOStatement
    {
        try {
            $_SESSION['___QUERY_DEBUG___'][] = (string) $q;

            return parent::query($q);
        } catch (\Exception $e) {
            $message = 'Error in query: <b>' . $q . '<b/><br /><br />' . $e->getMessage();
        }
    }
public function query(string $q): \PDOStatement
    {
        try {
            $_SESSION['___QUERY_DEBUG___'][] = (string) $q;

            return parent::query($q);
        } catch (\Exception $e) {
            $message = 'Error in query: <b>' . $q . '<b/><br /><br />' . $e->getMessage();
        }
    }
public function query ( string $ q ) : \ PDOStatement { try { $ _SESSION [ '___QUERY_DEBUG___' ] [ ] = ( string ) $ q ; return parent :: query ( $ q ) ; } catch ( \ Exception $ e ) { $ message = 'Error in query: <b>' . $ q . '<b/><br /><br />' . $ e -> getMessage ( ) ; } }
Performs a query, and if it is in debug mode it analyzes which query was executed

@param SQL string, recieve a SQL query to execute

@return object \PDOStatement
Performs a query and if it is in debug mode it analyzes which query was executed