MCPcopy Create free account
hub / github.com/acl-dev/acl / tbl_delete

Function tbl_delete

lib_acl_cpp/samples/db/mysql_query/main.cpp:226–249  ·  view source on GitHub ↗

ɾ��������

Source from the content-addressed store, hash-verified

224
225// ɾ��������
226static bool tbl_delete(acl::db_handle& db, int n)
227{
228 acl::query query;
229 query.create_sql("delete from group_tbl where group_name=:group")
230 .set_format("group", "group-%d", n);
231
232 if (db.exec_update(query) == false)
233 {
234 printf("delete sql error\r\n");
235 return (false);
236 }
237
238 for (size_t i = 0; i < db.length(); i++)
239 {
240 const acl::db_row* row = db[i];
241 for (size_t j = 0; j < row->length(); j++)
242 printf("%s, ", (*row)[j]);
243 printf("\r\n");
244 }
245 // �ͷŲ�ѯ���
246 db.free_result();
247
248 return (true);
249}
250
251int main(void)
252{

Callers 1

mainFunction · 0.70

Calls 3

exec_updateMethod · 0.80
free_resultMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…