sqlanywhere_execute (deprecated)

Prototype
bool sqlanywhere_execute(  resource link_identifier, string sql_str )
Description

This function is deprecated.

Prepares and executes the SQL query sql_str on the connection identified by the link_identifier that has already been opened using sqlanywhere_connect or sqlanywhere_pconnect. This function returns TRUE or FALSE depending on the outcome of the query execution. This function is suitable for queries that do not return result sets. If you are expecting a result set, use the sqlanywhere_query function instead.

Parameters

link_identifier   A link identifier returned by sqlanywhere_connect or sqlanywhere_pconnect.

sql_str   A SQL statement supported by SQL Anywhere.

Returns

TRUE if the query executed successfully, otherwise, FALSE and an error message.

Example

This example shows how to execute a DDL statement using the sqlanywhere_execute function.

if( sqlanywhere_execute( $conn, "CREATE TABLE my_test_table( INT id )" ) ) {
   // handle success
} else {
   // handle failure
}
Related functions