Skip to content

Instantly share code, notes, and snippets.

@forsythetony
Created November 20, 2014 02:42
Show Gist options
  • Save forsythetony/6fcde1e370c05f47ebc0 to your computer and use it in GitHub Desktop.
Save forsythetony/6fcde1e370c05f47ebc0 to your computer and use it in GitHub Desktop.
Strong independent black woman
if( sqlite3_prepare_v2(conn, select, -1, &statement, 0) == SQLITE_OK)
{
numCol = sqlite3_column_count( statement );
printf("\n");
while( sqlite3_step( statement) == SQLITE_ROW )
{
int i = 0;
for( i; i < numCol ; i++ )
{
int columnType = sqlite3_column_type( statement, i );
switch( columnType )
{
case SQLITE_TEXT:
{
char *resultString = (char*)sqlite3_column_text( statement, i );
printf(" %s ", resultString );
break;
}
case SQLITE_INTEGER:
{
int resultInteger = (int)sqlite3_column_int( statement, i);
printf( " %d ", resultInteger );
break;
}
default:
printf( "WRONG!");
}
}
printf( "\n");
}
printf("\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment