Extracted from Pike v7.8 release 866 at 2015-10-24.
pike.ida.liu.se
[Top]
Sql
Sql.Sql

Method Sql.Sql()->typed_query()


Method typed_query

array(mapping(string:mixed)) typed_query(object|string q, mixed ... extraargs)

Description

Sends an SQL query synchronously to the underlying SQL-server and returns the results in typed mode.

For the arguments, please see the query() function.

Returns

Returns one of the following on success:

array(mapping(string:mixed))

The result as an array of mappings indexed on the name of the columns. The values have the appropriate native pike types where they fit the SQL data types - see the class doc for details on typed mode.

zero

The value 0 (zero) if the query didn't return any result (eg INSERT or similar).


Note

Typed mode is not supported by all sql databases. If not supported, an error is thrown.

See also

query , big_typed_query