Created
          May 4, 2014 06:03 
        
      - 
      
- 
        Save nonstriater/32e3179d5e8d11a5e8cb to your computer and use it in GitHub Desktop. 
    sqlite3 api使用
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | if (sqlite3_open([DATABASE UTF8String], &database) == SQLITE_OK) | |
| { | |
| NSString *sql = [NSString stringWithFormat:@"update lpb set %@ = '%@' where level='%@'", self.typeString, self.iconString, self.levelString]; | |
| if (sqlite3_exec(database, [sql UTF8String], NULL, NULL, &error) != SQLITE_OK) | |
| NSLog(@"LPBERROR: %@ , %s",sql, error); | |
| sqlite3_close(database); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment