主要用于维护C结构的查询和返回。
#include typedef std::string string; struct MySQL_parm{ string host; string user; string password; string database; string unixsock; }; class DBSTMT; class DBMySQL; class DBSTMT{ DBSTMT(const DBSTMT&); DBSTMT& operator=(const DBSTMT&); MySQL_STMT* stmt_; public: DBSTMT(pcsz_t query,DBMysql& sql/Index.html'>mysql); void execute(){ if(sql/Index.html'>mysql_stmt_execute(stmt_)) throw sql/Index.html'>mysql_stmt_error(stmt_); } void execute(MYSQL_BIND* bind){ if(sql/Index.html'>mysql_stmt_execute(stmt_)) throw sql/Index.html'>mysql_stmt_error(stmt_); if(sql/Index.html'>mysql_stmt_bind_result(stmt_,bind)){ throw sql/Index.html'>mysql_stmt_error(stmt_); } if(sql/Index.html'>mysql_stmt_store_result(stmt_)) throw sql/Index.html'>mysql_stmt_error(stmt_); } [1] [2] [3] [4] [5] [6] [7] 下一页
|