sqlite3????????
???????????? ???????[ 2014/1/21 11:28:24 ] ????????????? ????
????7.???????????
????sqlite>alter table usr add column country text;
????/******************************************/
??????????
????sqlite?????
????1.??sqlite?????
????int sqlite3_open(char *path?? sqlite3 **db);
????path: ??????????·??
????db: ???sqlite????????
??????????? ???????0????????????????????
????2.???sqlite?????
????int sqlite3_close(sqlite3 *db);
??????????? ???????0?????????????
????3.
????const char *sqlite3_errmsg(sqlite3 *db);
??????????? ??????????
????????????????
????gcc -o test test.c -lsqlite3
????4.???SQL????
typedef int (*sqlite3_callback)(void *?? int?? char **?? char **);
int sqlite3_exec(sqlite3 *db?? const char *sql?? sqlite3_callback callback?? void *?? char **errmsg);
db: ????????
sql: SQL???
callback?????????
errmsg: ?????????????
??????????? ???????0?????????????
????5.????????????????????λ??????
typedef int (*sqlite3_callback)(void *para?? int f_num?? char **f_value?? char **f_name);
para: ???????????????
f_num: ???????????????
f_value: ????????????????????
f_name: ??????????????????????
??????????? ???????0????????-1
????6.??????????????SQL????
????int sqlite3_get_table(sqlite3 *db?? const char *sql?? char ***resultp?? int *nrow?? int *ncolumn?? char **errmsg);
????db: ???????
????sql: SQL???
????resultp: ???????sql??н???????
????nrow: ?????????????????
????ncolumn: ??????????????????
????errmsg?? ?????????????
??????????? ???????0?????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11