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

Function tbl_delete

lib_acl_cpp/samples/mysql/mysql.cpp:146–170  ·  view source on GitHub ↗

ɾ��������

Source from the content-addressed store, hash-verified

144
145// ɾ��������
146static bool tbl_delete(acl::db_handle& db, int n)
147{
148 const char* sql_fmt = "delete from group_tbl where group_name='%s-%d'";
149
150 acl::string sql;
151 sql.format(sql_fmt,
152 acl::strconv(__pre, strlen(__pre), "gbk", "utf8" ).c_str(), n);
153
154 if (db.sql_update(sql.c_str()) == false) {
155 printf("delete sql error\r\n");
156 return false;
157 }
158
159 for (size_t i = 0; i < db.length(); i++) {
160 const acl::db_row* row = db[i];
161 for (size_t j = 0; j < row->length(); j++) {
162 printf("%s, ", (*row)[j]);
163 }
164 printf("\r\n");
165 }
166 // �ͷŲ�ѯ���
167 db.free_result();
168
169 return true;
170}
171
172int main(void)
173{

Callers 1

mainFunction · 0.70

Calls 6

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…