有将图像插入其他字段的代码:
UIImage *image1 = [UIImage imageNamed:@"recette.jpg"];
NSData *image2 = UIImagePNGRepresentation(image1);
if (sqlite3_open(dbpath, &contactDB) == SQLITE_OK)
{
NSString *insertSQL = [NSString stringWithFormat: @"INSERT INTO CONTACTS (name, address, phone,image) VALUES (\"%@\", \"%@\", \"%@\", \"%@\" )", name.text, address.text, phone.text,image2];
认为