Skip to content

Instantly share code, notes, and snippets.

@romyilano
Created February 6, 2013 19:45
Show Gist options
  • Select an option

  • Save romyilano/4725193 to your computer and use it in GitHub Desktop.

Select an option

Save romyilano/4725193 to your computer and use it in GitHub Desktop.
Dealing with null values in an SQL database for objective-C Often there are nil values in SQL For some reason the excellent NSNULL NullSafe open source library didn't do the trick for me Source: http://stackoverflow.com/questions/6107416/using-sign-percentage-symbol-in-a-sql-query-with-objective-c
char *ortData = (char *)sqlite3_column_text(statement, 3);
NSString *ort = ortData == NULL ? nil : [[NSString alloc] initWithUTF8String:ortData];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment