Print data from a query result
Synopsis:
#include <qdb/qdb.h>
int qdb_printmsg( FILE *file,
qdb_result_t *result,
int format );
Arguments:
- file
- A file handle where the function can send the results.
- result
- The query result you want to print.
- format
- The format you want the results in. Can be one of:
- QDB_FORMAT_SIMPLE — minimal formatting.
- QDB_FORMAT_HTML — HTML formatting, suitable for viewing in a web browser.
- QDB_FORMAT_COLUMN — column formatting, so that results appear under column names.
Description:
This function prints the results of an SQL SELECT query on a QDB database. You must specify a standard file stream, such as stdout.
Returns:
- >-1
- The number of rows in the results.
- -1
- An error occurred (errno is set).
Errors:
- EINVAL
- Invalid format specified.
Classification:
QNX Neutrino
Safety: |
|
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |