���ӱ�����
| 40 | |
| 41 | // ���ӱ����� |
| 42 | static bool tbl_insert(acl::db_handle& db, int n) |
| 43 | { |
| 44 | const char* sql_fmt = "insert into group_tbl('group_name', 'uvip_tbl')" |
| 45 | " values('���-%d', 'test')"; |
| 46 | |
| 47 | acl::string sql; |
| 48 | sql.format(sql_fmt, n); |
| 49 | if (db.sql_update(sql.c_str()) == false) |
| 50 | return (false); |
| 51 | |
| 52 | const acl::db_rows* result = db.get_result(); |
| 53 | if (result) |
| 54 | { |
| 55 | const std::vector<acl::db_row*>& rows = result->get_rows(); |
| 56 | for (size_t i = 0; i < rows.size(); i++) |
| 57 | { |
| 58 | const acl::db_row* row = rows[i]; |
| 59 | for (size_t j = 0; j < row->length(); j++) |
| 60 | printf("%s, ", (*row)[j]); |
| 61 | printf("\r\n"); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | db.free_result(); |
| 66 | return (true); |
| 67 | } |
| 68 | |
| 69 | // ��ѯ������ |
| 70 | static int tbl_select(acl::db_handle& db, int n) |
no test coverage detected
searching dependent graphs…