Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

nezumi_sql.h

00001 // $Id: nezumi_sql.h 206 2006-02-06 15:20:53Z MagicalTux $
00002 // Global SQL functions
00003 // Based on Gabuzomeu's work
00004 
00005 #include <config.h>
00006 
00007 #ifndef _SQL_H_
00008 #define _SQL_H_
00009 
00010 #ifdef USE_SQL
00011 
00012 #if 0
00013 #include "utils.h"
00014 #ifndef _WIN32
00015 # include <mysql.h>
00016 #else
00017 # include <mysql/mysql.h>
00018 #endif
00019 #endif
00020 
00021 #define MAX_SQL_BUFFER 65535 * 2 // memo is limited to 60000, x2 for escape code
00022 
00023 #ifdef USE_MYSQL
00024 // MySQL variables
00025 unsigned int db_mysql_server_port;
00026 char db_mysql_server_ip[1024]; /* configuration line are readed for 1024 char */
00027 char db_mysql_server_id[32];
00028 char db_mysql_server_pw[32];
00029 char db_mysql_server_db[32];
00030 #endif /* USE_MYSQL */
00031 
00032 #ifdef USE_SQLITE
00033 char db_sqlite_database_file[256]; /* where the SQLite database will be stored */
00034 #endif /* USE_SQLITE */
00035 
00036 #ifdef USE_PGSQL
00037 // PgSQL variables
00038 char db_pgsql_conninfo[1024]; 
00039 #endif
00040 
00041 // Our functions
00042 int sql_request(const char *format, ...);
00043 void sql_init();
00044 void sql_close(void);
00045 int sql_get_row(void);
00046 char *sql_get_string(int num_col);
00047 int sql_get_integer(int num_col);
00048 unsigned long sql_num_rows(void);
00049 unsigned long db_sql_escape_string(char *to, const char *from, unsigned long from_length);
00050 
00051 #endif /* USE_SQL */
00052 
00053 #endif /* _SQL_H_ */
00054 

Generated on Fri Apr 28 10:20:04 2006 for OpenAthena by  doxygen 1.4.4