#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…
数据库(SQLite) 01-多表查询 格式:select 字段1,字段2,... from 表名1,表名2; 别名:select 别名1.字段1 as 字段别名1,别名2.字段2 as 字段别名2,... from 表名1 as 别名1,表名2 as 别名2; 可以给表或字段单独起别名,as可省略 表连接查询:select 字段1,字段2,... from 表名1,表名2 where 表名1.id = 表名2.id; 外键: 如果表A的主关键字是表B中的字段,则该字段成为表B的外键 保持数据的…
1. 前言 Block:带有自动变量(局部变量)的匿名函数.它是C语言的扩充功能.之所以是拓展,是因为C语言不允许存在这样匿名函数. 1.1 匿名函数 匿名函数是指不带函数名称函数.C语言中,函数是怎样的呢?类似这样: int func(int count); 调用的时候: int result = func(10); func就是它的函数名.也可以通过指针调用函数,看起来没用到函数名: int result = (*funcptr)(10); 实际,在赋值给函数指针时,必须通过函数的名称才能获…
- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight; Creates and returns a new image object with the specified cap values. Deprecation StatementDeprecated. Use the resizableImageWithCapInsets: in…