2.2. Database Query Functions

2.2.1. dbd_fetch_row

int dbd_fetch_row(dbi_result_t *result, unsigned int rownum)

Fetches the target row, retrieving one-time field information if necessary. Also see the _dbd_row_allocate and _dbd_row_finalize helper functions.

2.2.2. dbd_free_query

int dbd_free_query(dbi_result_t *result)

Frees the target result handle.

2.2.3. dbd_goto_row

int dbd_goto_row(dbi_result_t *result, unsigned int row)

Jumps to the specifed row in the result set.

2.2.4. dbd_list_dbs

dbi_result_t *dbd_list_dbs(dbi_conn_t *conn)

Performs a query that retrieves the list of databases, with the database name as the first column in the result set.

2.2.5. dbd_list_tables

dbi_result_t *dbd_list_tables(dbi_conn_t *conn, const char *db)

Performs a query that retrieves the list of tables in the specified database, with the table name as the first column in the result set.

2.2.6. dbd_query

dbi_result_t *dbd_query(dbi_conn_t *conn, const char *statement)

Performs a query and keeps track of meta-information about the query. Also see the _dbd_result_create helper function.

2.2.7. dbd_select_db

char *dbd_select_db(dbi_conn_t *conn, const char *db)

Selects a new database on the server.