Name
Method: connection.query( )
Signature
statement_handle
=connection
.query(sql
)
Synopsis
Like the do() method, this method sends the specified SQL statement to the currently selected database. Unlike the do() method, this method returns a statement handler object that encapsulates data about the results of the SQL query as well as the results themselves.
Example
hndl = conn.query(`SELECT title, year FROM movies');
Get MySQL and mSQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.