Oracle 5.0 Reference Manual page 2165

Table of Contents

Advertisement

Errors
None.
Example
char *stmt = "UPDATE products SET cost=cost*1.25
mysql_query(&mysql,stmt);
printf("%ld products updated",
(long) mysql_affected_rows(&mysql));
20.6.6.2.
mysql_autocommit()
my_bool mysql_autocommit(MYSQL *mysql, my_bool mode)
Description
Sets autocommit mode on if
Return Values
Zero if successful. Nonzero if an error occurred.
Errors
None.
20.6.6.3.
mysql_change_user()
my_bool mysql_change_user(MYSQL *mysql, const char *user, const char
*password, const char *db)
Description
Changes the user and causes the database specified by
on the connection specified by mysql. In subsequent queries, this database is the default for table
references that do not include an explicit database specifier.
mysql_change_user()
permission to use the database. In this case, the user and database are not changed.
The
parameter may be set to
db
This command resets the state as if one had done a new connect. (See
Automatic Reconnection
and drops all temporary tables, and unlocks all locked tables. Session system variables are reset to the
values of the corresponding global system variables. Prepared statements are released and
variables are closed. Locks acquired with
the user didn't change.
Return Values
Zero for success. Nonzero if an error occurred.
Errors
The same that you can get from mysql_real_connect().
CR_COMMANDS_OUT_OF_SYNC
Commands were executed in an improper order.
CR_SERVER_GONE_ERROR
C API Function Descriptions
WHERE group=10";
is 1, off if
mode
fails if the connected user cannot be authenticated or doesn't have
NULL
Behavior".) It always performs a
[2942]
[2942]
is 0.
mode
to become the default (current) database
db
if you don't want to have a default database.
ROLLBACK
[965]
are released. These effects occur even if
GET_LOCK()
2145
Section 20.6.14, "Controlling
of any active transactions, closes
HANDLER

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents