在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1、数据库链接 int cppDatebase::DatabaseConnect(sBit8 *uName,sBit8 *pWord,sBit8 *dbName) { dbHandle = mysql_init(NULL); if(NULL == mysql_real_connect(dbHandle ,"localhost",uName,pWord,dbName,0,NULL,0)) { mysql_set_character_set(dbHandle ,"utf8"); return 0; }
2、数据库插入——增 int cppDatebase::DatabaseInsert(const char *cmd) int ret = mysql_query(dbHandle,cmd); return 0;
3、数据库删除——删 int cppDatebase::DatabaseDelete(const char *cmd) int ret = mysql_query(dbHandle,cmd); return 0;
4、数据库更新——改 int cppDatebase::DatabaseUpdate(const char *cmd) int ret = mysql_query(dbHandle,cmd); return 0;
5、数据库查询——查 int cppDatebase::DatabaseQuery(char *cmd, char **row) mysql_real_query(dbHandle,cmd,strlen(cmd)); MYSQL_RES *result = mysql_store_result(dbHandle); return 0;
6、数据库断开 int cppDatebase::DatabaseClose() return 0; |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论