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

Function tbl_delete

lib_acl_cpp/samples/db/mysql_manager/main.cpp:211–234  ·  view source on GitHub ↗

ɾ��������

Source from the content-addressed store, hash-verified

209
210// ɾ��������
211static bool tbl_delete(acl::db_handle& db, int n)
212{
213 acl::query query;
214 query.create_sql("delete from group_tbl where group_name=:group")
215 .set_format("group", "group-%d", n);
216
217 if (db.exec_update(query) == false)
218 {
219 printf("delete sql error\r\n");
220 return (false);
221 }
222
223 for (size_t i = 0; i < db.length(); i++)
224 {
225 const acl::db_row* row = db[i];
226 for (size_t j = 0; j < row->length(); j++)
227 printf("%s, ", (*row)[j]);
228 printf("\r\n");
229 }
230 // �ͷŲ�ѯ���
231 db.free_result();
232
233 return (true);
234}
235
236//////////////////////////////////////////////////////////////////////////////
237

Callers 1

runMethod · 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…