#include "SQL.h" SQLConnection::SQLConnection(String host, String user, String passwd, String db, int port, String socket, unsigned long cflags) throw (GeneralException) : res(0) { mysql_init(&con); char * p; if (!mysql_real_connect(&con, p = ((ugly_string)(host)).p ? p : 0, ((ugly_string)(user)).p, ((ugly_string)(passwd)).p, ((ugly_string)(db)).p, port, ((ugly_string)(socket)).p, cflags)) { throw GeneralException(String("Could not connect to MySQL host ") + p); } } SQLConnection::~SQLConnection() { mysql_close(&con); } void SQLConnection::query(String q) throw(GeneralException) { }