| | |
| | | #include <iostream> |
| | | #include <mysql++.h> |
| | | #include <AppConfig.h> |
| | | #include <QtCore/QMutex> |
| | | |
| | | using namespace std; |
| | | |
| | | static mysqlpp::Connection* conn; |
| | | class BaseDao { |
| | | public: |
| | | static QMutex m_mutexVisit; |
| | | private: |
| | | static mysqlpp::Connection* conn; |
| | | public: |
| | | static mysqlpp::SimpleResult add(std::map<std::string, std::string>& columns, string tableName) { |
| | | initConnection(); |
| | |
| | | // appConfig.getIntProperty("db_port") |
| | | // )) { |
| | | if (conn->connect( |
| | | "basic_business_table", |
| | | "127.0.0.1", |
| | | "EGEyesForVSS", |
| | | "192.168.1.148", |
| | | "root", |
| | | "root", |
| | | "123456", |
| | | 3306 |
| | | )) { |
| | | cout << "connect success" << endl; |