resource sqlanywhere_query( resource link_identifier, string sql_str )
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.
link_identifier The link identifier returned by a sqlanywhere_connect function.
sql_str A SQL statement supported by SQL Anywhere.
For more information about SQL statements, see SQL Statements.
A positive value representing the result ID on success, or 0 and an error message on failure.
This example executes the query SELECT * FROM SYSTAB on the SQL Anywhere database.
$result = sqlanywhere_query( $conn, "SELECT * FROM SYSTAB" );