You are here : cpp0mysql_set_server_option

mysql_set_server_option() - 0

 Enables or disables an option for the connection.
        option can have one of the following values.optionOptionDescriptionMYSQL_OPTION_MULTI_STATEMENTS_ONEnable multiple-statement supportMYSQL_OPTION_MULTI_STATEMENTS_OFFDisable multiple-statement supportOptionDescriptionMYSQL_OPTION_MULTI_STATEMENTS_ONEnable multiple-statement supportMYSQL_OPTION_MULTI_STATEMENTS_OFFDisable multiple-statement supportOptionDescriptionOptionDescriptionOptionDescriptionMYSQL_OPTION_MULTI_STATEMENTS_ONEnable multiple-statement supportMYSQL_OPTION_MULTI_STATEMENTS_OFFDisable multiple-statement supportMYSQL_OPTION_MULTI_STATEMENTS_ONEnable multiple-statement supportMYSQL_OPTION_MULTI_STATEMENTS_ONMYSQL_OPTION_MULTI_STATEMENTS_ONEnable multiple-statement supportMYSQL_OPTION_MULTI_STATEMENTS_OFFDisable multiple-statement supportMYSQL_OPTION_MULTI_STATEMENTS_OFFMYSQL_OPTION_MULTI_STATEMENTS_OFFDisable multiple-statement supportIf you enable multiple-statement support, you should retrieve
        results from calls to
        mysql_query() or
        mysql_real_query() by using a
        loop that calls
        mysql_next_result() to determine
        whether there are more results. For an example, see
        Section 25.8.17, “C API Support for Multiple Statement Execution”.mysql_query()mysql_query()mysql_real_query()mysql_real_query()mysql_next_result()mysql_next_result()Section 25.8.17, “C API Support for Multiple Statement Execution”Enabling multiple-statement support with
        MYSQL_OPTION_MULTI_STATEMENTS_ON does not
        have quite the same effect as enabling it by passing the
        CLIENT_MULTI_STATEMENTS flag to
        mysql_real_connect():
        CLIENT_MULTI_STATEMENTS also enables
        CLIENT_MULTI_RESULTS. If you are using the
        CALL SQL statement in your
        programs, multiple-result support must be enabled; this means
        that MYSQL_OPTION_MULTI_STATEMENTS_ON by
        itself is insufficient to permit the use of
        CALL.MYSQL_OPTION_MULTI_STATEMENTS_ONCLIENT_MULTI_STATEMENTSmysql_real_connect()mysql_real_connect()CLIENT_MULTI_STATEMENTSCLIENT_MULTI_RESULTSCALLCALLMYSQL_OPTION_MULTI_STATEMENTS_ONCALLCALL


Syntax

int mysql_set_server_option(MYSQL *mysql, enum
        enum_mysql_set_option option)


Example

 


Output / Return Value

 Zero for success. Nonzero if an error occurred.


Limitations


Alternatives / See Also


Reference