query()方法实际上是把select语句拆分成了若干个组成部分,然后作为方法的输入参数: SQLiteDatabase db = databaseHelper.getWritableDatabase(); Cursor cursor = db.query("person", new String[]{"personid,name,age"}, "name like ?", new String[]{"%传智%"}, nul
#import <sqlite3.h> @interface ViewController () { sqlite3 *_sqldb; } @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. [self OpenDb]; [self create
root@cacti:~/box# cat convert.py #!/usr/bin/env python import sqlite3,time,rrdtool,os def boxstatus(): ''' check the status of the box, and set it to 1 if it is online, set it to 0 if it is offline ''' if "status.db": os.system('rm status.db') d