| 73 | } |
| 74 | |
| 75 | int dbget(acl::db_handle& db, int max) { |
| 76 | acl::string sql, key, value; |
| 77 | int i; |
| 78 | for (i = 0; i < max; i++) { |
| 79 | key.format("key-%d", i); |
| 80 | sql.format("select value from tbl_test" |
| 81 | " where key='%s'", key.c_str()); |
| 82 | if (db.sql_select(sql) == false) { |
| 83 | printf("sql_select: |%s| error\r\n", sql.c_str()); |
| 84 | return -1; |
| 85 | } |
| 86 | if (db.length() == 0) { |
| 87 | break; |
| 88 | } |
| 89 | db.free_result(); |
| 90 | } |
| 91 | return i; |
| 92 | } |
| 93 | |
| 94 | int dbupdate(acl::db_handle& db, int max) { |
| 95 | acl::string sql, key, value; |
nothing calls this directly
no test coverage detected