标签:eva int 信息 query base select main from open
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 */ ); void sqlite3_free_table(char **result);
void main(void) { ...... rc = sqlite3_get_table(db, "SELECT * FROM RELAY", &dbresult, &nRow, &nColum, &zErrMsg); if(rc == SQLITE_OK) { index = nColum; for(i = 0; i < nRow; i++) { for(j = 0; j < nColum; j++) { printf("zidanming:%s, ziduanzhi:%s\n", dbresult[j], dbresult[index]); ++index; } } }
sqlite3_free_table(dbresult);
......
}
sqlite3入门之sqlite3_get_table,sqlite3_free_table
标签:eva int 信息 query base select main from open
原文地址:https://www.cnblogs.com/icefree/p/11182820.html