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