Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

d_mysql_f.c File Reference

Forms version of MySQL driver. More...

#include "../config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <mysql.h>
#include "buf.h"
#include "db_conn.h"

Include dependency graph for d_mysql_f.c:

Include dependency graph

Go to the source code of this file.

Data Structures

struct  DBConnection_MYSQL
 The MySQL-specific database connection structure. More...


Defines

#define BASENAME   "Database"
 Database name.

#define BASEHOST   "Host"
 Database host.

#define BASEPASS   "Password"
 Database password.

#define DESCRIBE_S   "describe %s"
 SQL template string for the DESCRIBE query.


Functions

void mysql_dbconnection_free (DBConnection *dbconn)
 Free a DBConnection and it's related DBConnection_MYSQL.

char * my_DBform_to_url (Form *frm)

Variables

MYSQL_RES dummyRes
 A nasty hack: if a MySQL query succeeded, but returned a NULL result (e.g.


Detailed Description

Forms version of MySQL driver.

Author:
Des Herriot , Lionel ULMER , Darryl Luff
This is a user-interface independent database driver linking MySQL with the GtkSQL application.

Definition in file d_mysql_f.c.


Function Documentation

char* my_DBform_to_url Form   frm
 

Parameters:
frm  The form to copy to.
Returns:
The buffer containing the URL.

Definition at line 181 of file d_mysql_f.c.

References _a_buf::b_dat, BASEHOST, BASENAME, BASEPASS, buf_check(), buf_strcat(), buf_strcpy(), frm_get_title(), and frm_get_value_by_name().

void mysql_dbconnection_free DBConnection   dbconn
 

Free a DBConnection and it's related DBConnection_MYSQL.

Parameters:
dbconn  The DBConnection to free.

Definition at line 103 of file d_mysql_f.c.

References DBConnection_MYSQL::dbname, keywords_remove_all(), and db_conn::pvt.


Variable Documentation

MYSQL_RES dummyRes
 

A nasty hack: if a MySQL query succeeded, but returned a NULL result (e.g.

after an UPDATE), we return the address of dummy_res from DBexecute_query(). This is so we can distinguish a successful query which returned nothing from a failed query in DBget_query_status().

Definition at line 66 of file d_mysql_f.c.


Generated on Sun May 9 19:19:19 2004 for GtkSQL by doxygen1.2.18