LIBMSQL(3)

NAME
libmsql - Mini SQL Programming API

DESCRIPTION
Included in the distribution is the Mini SQL API library, libmsql.a or libmsql.so.1.0.16 respectively. The API allows any C program to communicate with the database engine. The API functions are accessed by including the <msql.h> header file into your program and by linking against the Mini SQL library (using -lmsql as an argument to your C compiler). The library and header file is installed by default into /lib and /usr/include respectively.

ENVIRONMENT
The mSQL library may be controlled by some environment variables. They override compiled-in default values and they are used when not arguments are spcified. They may be overridden by arguments (i.e. msqlConnect()).

MSQL_TCP_PORT
    Specifies the TCP port on which the database engine listen to requests.

MSQL_UNIX_PORT
    Specifies the unix domain socket that shall be used to contact the engine if it runs on the local host.

MINERVA_DEBUG
    Specify debuging. See section DEBUGGING for a list of possible values.

DEBUGGING
If you wish to debug the API you may set MINERVA_DEBUG to one or more of the folowing values, separated by a colon ``:''. The values are the same as described in msqld(8) with the modification that they are prefixed by ``msql_''.

msql_api
    Display internal information, such as connection details.

msql_query
    Display each query as it is sent to the engine. This is very useful especially if you're programming an appliction but queries fail.

msql_malloc
    Display details of memory allocation.

NOTE
As an addition to the standard behaviour of the API library the Debian Linux release also accepts an extented form of a hostname, typical for IRC. It consists of either a hostname or a hostname followed by a colon and a port number (e.g. finlandia:4321). By adding this feature you get an easy way to handle different database engines on different hosts and different ports. You may also use the MSQL_HOST and MSQL_TCP_PORT environment variable to specify a database engine.

AUTHOR
Mini SQL has been written by David Hughes of Bond University, Australia as part of the Minerva Network Management Environment. He may be reached via electronic mail using bambi@Bond.edu.au.

SEE ALSO
msqlConnect(3), msqlSelectDB(3), msqlQuery(3), msqlStoreResult(3), msqlFreeResult(3), msqlFetchRow(3), msqlDataSeek(3), msqlNumRows(3), msqlFetchField(3), msqlFieldSeek(3), msqlNumFields(3), msqlListDB(3), msqlListTables(3), msqlListFields(3), msqlClose(3), msqld(8), msql(5).