PDO::query

Executes an SQL statement, returning a result set as a PDOStatement object

PDO::query executes an SQL statement in a single function call, returning the result set (if any) returned by the statement as a PDOStatement object.