#ifndef __SQL_H__ #define __SQL_H__ #include #include #include typedef std::map AssocArray; typedef std::map::iterator AssocArrayIterator; class SQLConnection : public Base { public: SQLConnection(const String & host, const String & user, const String & passwd, const String & db, int port = 3306, const String & socket = "", unsigned long clags = 0) throw (GeneralException); ~SQLConnection(); int query(const String &); int numrows(); int numfields(); AssocArray fetchrow(); int numaffectedrows(); int insertid(); int errno(); String error(); private: MYSQL con; MYSQL_RES * res; int nr, nf, na, ii; MYSQL_FIELD * fields; }; #endif