From 23974eb093c83a5e6f7b1109e0f739ad7a870aac Mon Sep 17 00:00:00 2001 From: pixel Date: Thu, 21 Aug 2003 16:49:52 +0000 Subject: Starting MySQL code --- include/BString.h | 2 ++ include/Makefile.am | 2 +- include/SQL.h | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 include/SQL.h (limited to 'include') diff --git a/include/BString.h b/include/BString.h index ab4f5e5..b5a273f 100644 --- a/include/BString.h +++ b/include/BString.h @@ -73,4 +73,6 @@ std::istream & operator>>(std::istream &, String &); String operator+(const char *, const String &); +bool compare(String, String); + #endif diff --git a/include/Makefile.am b/include/Makefile.am index 583a97d..a84dd81 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,6 +2,6 @@ pkginclude_HEADERS = \ Exceptions.h Handle.h BString.h Output.h Socket.h HttpServ.h Variables.h Menu.h \ Action.h Message.h Form.h Confirm.h Table.h IRC.h Task.h Buffer.h generic.h \ CopyJob.h ReadJob.h Regex.h TaskMan.h InPipe.h OutPipe.h Input.h Image.h \ -Main.h Color.h GMPString.h +Main.h Color.h GMPString.h SQL.h noinst_HEADERS = gettext.h diff --git a/include/SQL.h b/include/SQL.h new file mode 100644 index 0000000..ee28eb0 --- /dev/null +++ b/include/SQL.h @@ -0,0 +1,20 @@ +#ifndef __SQL_H__ +#define __SQL_H__ + +#include +#include +#include + +//typedef AssocArray std::set; + +class SQLConnection : public Base { + public: + SQLConnection(String host, String user, String passwd, String db, int port = 3306, String socket = "", unsigned long clags = 0) throw (GeneralException); + ~SQLConnection(); + void query(String) throw (GeneralException); + private: + MYSQL con; + MYSQL_RES * res; +}; + +#endif -- cgit v1.2.3