Skip to main content

db_exec

Discworld driver help

db_exec

WARNING!!!!

Avoid using this on discworld at all costs. Please see db.h and mysql.c for information on how to use this. Use DB_HANDLER from db.h

Name

db_exec() - execute a SQL query

Synopsis

mixed db_exec( int handle, string query );

Description

Do not use this! See warning above.

db_exec() sends the SQL query `query' to the database server using the connection `handle'. It returns the number of rows in the result set of the query, which can be used when retrieving the result using db_fetch() later. For certain queries, such as INSERT, UPDATE or DELETE statements, the number of rows will be 0 because there is no result set.

Errors

When there was an error executing the query this error is returned as a string.
The format depends on the database engine used in the game driver.

See also

db_fetch(), db_connect(), db_close()