Alias queryResult

Execute a one-off SQL SELECT command where you expect the entire result set all at once.

alias deprecated queryResult ;

This is being considered for deprecation in a future release of mysql-native, because the same thing can be achieved via query(). array().

If the SQL command does not produce a result set (such as INSERT/CREATE/etc), then MySQLNoResultRecievedException will be thrown. Use exec instead for such commands.

Use this method when you are not going to be using the same command repeatedly and you are CERTAIN all the data you're sending is properly escaped. Otherwise consider using Prepared.

If there are long data items among the expected result columns you can use the csa param to specify that they are to be subject to chunked transfer via a delegate.

Parameters

NameDescription
conn An open Connection to the database.
sql The SQL command to be run.
csa An optional array of ColumnSpecialization structs.

Returns

A (possibly empty) ResultSet.