|
sqlanywhere_query
Prototype
resource sqlanywhere_query( resource link_identifier, string sql_str
)
Description
Prepares and executes the SQL query sql_str on the connection
identified by link_identifier that has already been opened using sqlanywhere_connect
or sqlanywhere_pconnect. For queries that do not return result sets, you can
use the sqlanywhere_execute function.
Parameters
link_identifier The link identifier returned by a sqlanywhere_connect function.
sql_str A SQL statement supported by Adaptive Server Anywhere.
For more information about SQL statements, see the Adaptive Server Anywhere SQL Reference manual.
Returns
A positive value representing the result ID on success, or 0 and an error message on failure.
Example
This example executes the query SELECT * FROM systable on the Adaptive Server
Anywhere database.
$result = sqlanywhere_query( $conn, "SELECT * FROM systable" );
Related functions
sqlanywhere_execute
sqlanywhere_free_result
|