#include #include #include #include //#include "d_html.h" using namespace std; class d_sql { private: MYSQL_ROW row; MYSQL dbase; MYSQL_RES *result; public: // program state info bool use_query; unsigned int state; // 0 = not connected // 1 = connected ? -- rest reserved // copies database info string d_host; string d_user; string d_pwd; string d_db; unsigned int d_port; vector head; // header -- indicate width of data vector head2; // header details vector data; // actual data // constructors, etc d_sql::d_sql(); d_sql::d_sql( string, string, string, string, unsigned int d = 0 ); d_sql::~d_sql(); // useful functions void d_sql::query( string ); void d_sql::query( char * ); void d_sql::init( void ); void d_sql::reset( void ); void d_sql::conn(); void d_sql::close(); // output -- may want to turn it off. // friend ostream &operator<<( ostream &out, const d_sql &L ); };