Since v2.5.5, v2.6.1 (SelectInt64 and SelectDateTime)
Methods of this group execute SQL query and return result as single value casted to XXX type.
Use these methods to execute an SQL statement against the database without the overhead of using a TMySQLQuery object. Methods return single value as a value of the field specified by number (aFieldNumber parameter) or by name (aFieldName parameter) in the first row of the first resultset. If the aFieldNumber parameter is omitted, methods return the value of the first field.
If the query doesn't return at least one row or specified field is not found, the IsOk param is set to False (SelectXxx methods) or aDefaultValue param value is returned (SelectXxxDef methods).
A String value containing the statement to be executed.
(SelectXxx methods) variable is set to True after successful execution, or False if requested value couldn't be fetched.
(SelectXxxDef methods) value to return by method if requested value can't be fetched.
Field number to return its value by method. Fields are numbered from zero. If this parameter is omitted, then it is assumed to be 0. In this case the value of the first field will be returned.
Field name to return its value by method.
This example will show MySQL server version (like TMySQLDatabase.GetServerInfo method):
This example will show current UNIX timestamp value returned by MySQL server: