Created
November 20, 2014 02:42
-
-
Save forsythetony/6fcde1e370c05f47ebc0 to your computer and use it in GitHub Desktop.
Strong independent black woman
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_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