Method Msql.msql()->big_query()


Method big_query

variant Result big_query(string(8bit) sqlquery)

Description

This is all you need to query the database. It takes as argument an SQL query string (e.g.: "SELECT foo,bar FROM baz WHERE name like '%kinkie%'" or "INSERT INTO baz VALUES ('kinkie','made','this')") and returns an object containing the returned values.

Throws

Errors (both from the interface and the SQL server) are reported via exceptions, and you definitely want to catch them. Error messages are not particularly verbose, since they account only for errors inside the driver. To get server-related error messages, you have to use the error function.

Note

Note that if the query is NOT a of SELECT type, but UPDATE or MODIFY, the returned value is a 0 (zero). This is not an error. Errors are reported only via exceptions.

See also

error