排序是在你的SQL语句中进行的,如SELECT ... ORDER BY ctime,sqlite3_get_table只是获取你sql语句的执行结果,得到一个一维数组,先记录字段名 接下来为字段的值
sprintf(sql,"select * from shidu1 where dateandtime between to_date( %s,'yyyy-mm-dd hh:mm:ss' ) ,and to_date( %s,'yyyy-mm-dd hh:mm:ss' ),stime,etime);
int index; result = sqlite3_open( “c:\\Dcg_database.db”, &db ); if( result != SQLITE_OK ) { //数据库打开失败 return -1; } //数据库操作代码 //假设前面已经创建了 MyTable_1 表 //开始查询,传入的 dbResult 已经是 char ,这里又加了一个 & 取地址符,传递进去的就成了 char resul...