Sqlite
来源:互联网 发布:英雄无敌3修改兵种数据 编辑:程序博客网 时间:2024/06/06 19:49
Function:
SQLITE_API int sqlite3_open(
const char *filename, /* Database filename (UTF-8) */
sqlite3 **ppDb /* OUT: SQLite db handle */
);
SQLITE_API int sqlite3_open16(
const void *filename, /* Database filename (UTF-16) */
sqlite3 **ppDb /* OUT: SQLite db handle */
);
SQLITE_API int sqlite3_open_v2(
const char *filename, /* Database filename (UTF-8) */
sqlite3 **ppDb, /* OUT: SQLite db handle */
int flags, /* Flags */
const char *zVfs /* Name of VFS module to use */
);
SQLITE_API int sqlite3_exec(
sqlite3*, /* An open database */
const char *sql, /* SQL to be evaluated */
int (*callback)(void*,int,char**,char**), /* Callback function */
void *, /* 1st argument to callback */
char **errmsg /* Error msg written here */
);
SQLITE_API int sqlite3_get_table(
sqlite3 *db, /* An open database */
const char *zSql, /* SQL to be evaluated */
char ***pazResult, /* Results of the query */
int *pnRow, /* Number of result rows written here */
int *pnColumn, /* Number of result columns written here */
char **pzErrmsg /* Error msg written here */
);
SQLITE_API void sqlite3_free_table(char **result);
Example:
sqlite3_get_table(DateBase,strSqlCmd,&dbResult,&nRow,&nColumn))
{
for (int i = 1; i <= nRow; i++)
{
for (int j = 0; j != nColumn; j++)
{
printf("%s", dbResult[i*nColumn + j]);
}
}
}
sqlite3_free_table(dbResult);
SQL:
Select b.AppName,b.Desc,b.ModulePath,b.Args,b.ClassName
from syn_toollist b , syn_exelist a
where b.AppName = a.AppName
order by Level1 asc, Level2 asc, level3 asc
- SQLite
- SQLite
- SQLite
- SQLite
- SQLite
- sqlite
- sqlite
- SQLite
- SQLite
- sqlite
- SQLite
- SQLite
- SQLite
- SQLite
- SQLite
- sqlite
- sqlite
- sqlite
- 【CakePHP1.3】_ACL和auth
- 网络互联设备对比
- phone apk不显示到APP列表中
- HTML:scrollLeft,scrollWidth,clientWidth,offsetWidth到底指的哪到哪的距离之完全详解
- HTML+CSS网页设计与布局从入门到精通摘要
- Sqlite
- Ubuntu下构建gstreamer开发环境
- MyEclipse8.6安装svn(非link方式)(插件安装)
- Cannot complete the install because one or more required items could not be found
- Stunnel使用详解
- CF 272 C. Dima and Staircase
- Java实现对ftp的读写文件(apache.commons.net.ftp)
- MVC学习二:MVC Action Result 返回类型扩展
- 英文词根