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

Function tbl_delete

lib_acl_cpp/samples/sqlite/sqlite.cpp:128–152  ·  view source on GitHub ↗

ɾ��������

Source from the content-addressed store, hash-verified

126
127// ɾ��������
128static bool tbl_delete(acl::db_handle& db, int n)
129{
130 const char* sql_fmt = "delete from group_tbl where group_name='���-%d'";
131
132 acl::string sql;
133 sql.format(sql_fmt, n);
134
135 if (db.sql_update(sql.c_str()) == false)
136 {
137 printf("delete sql error\r\n");
138 return (false);
139 }
140
141 for (size_t i = 0; i < db.length(); i++)
142 {
143 const acl::db_row* row = db[i];
144 for (size_t j = 0; j < row->length(); j++)
145 printf("%s, ", (*row)[j]);
146 printf("\r\n");
147 }
148 // �ͷŲ�ѯ���
149 db.free_result();
150
151 return (true);
152}
153
154class db_thread : public acl::thread
155{

Callers 1

runMethod · 0.70

Calls 5

free_resultMethod · 0.80
formatMethod · 0.45
sql_updateMethod · 0.45
c_strMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…