Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere PHP API » SQL Anywhere PHP API reference

 

sasql_query

Prototype
mixed sasql_query( sasql_conn $conn, string $sql_str [, int $result_mode ] )
Description

Prepares and executes the SQL query $sql_str on the connection identified by $conn that has already been opened using sasql_connect or sasql_pconnect.

The sasql_query function is equivalent to calling two functions, sasql_real_query and one of sasql_store_result or sasql_use_result.

Parameters

$conn   The connection resource returned by a connect function.

$sql_str   A SQL statement supported by SQL Anywhere.

$result_mode   Either SASQL_USE_RESULT, or SASQL_STORE_RESULT (the default).

For more information about SQL statements, see SQL statements.

Returns

FALSE on failure; TRUE on success for INSERT, UPDATE, DELETE, CREATE; sasql_result for SELECT.

Related functions