Skip to main content

db_fetch

Discworld driver help

db_fetch

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_fetch() - get the results from a previous query

Synopsis

mixed *db_fetch( int handle, int row );

Description

Do not use this! See warning above.

db_fetch() gets the results from the previous database transaction done with db_exec(), where `handle' is the database handle and `row' selects the desired row. Row 0 is special, it returns an array of the column names in the result set. Higher row numbers refer to the actual result columns of the query. Note that if db_exec() returned 3 for instance, row number 3 selects a valid row, unlike what you would expect because of sizeof() values for arrays.

Errors

A runtime error occurs in case of an invalid database handle or row.

See also

db_exec(), db_connect(), db_close()