I am getting strange wrong value from an INTEGER column in SQlite3. Here it is
From terminal I executed select satement
sqlite> select userId, email, firstName, lastName, mobilePhone, passWord, signupDate, profilePicture from SCH_USERS where email = 'sujitdala@y.ccom';
8|sujitdala@y.ccom|Sujit|Dalai|**5106932562**|yas|2015-02-22 02:05:55 +0000|
The mobilePhone value is 5106932562 Now when I am executing same select statement in IOS I am getting different value Here it is
NSString * sql = [NSString stringWithFormat:@"select userId, email, firstName, lastName, mobilePhone, passWord, signupDate, profilePicture from SCH_USERS where email = '%@';", email];
NSLog(@"sql: %@", sql);
sqlite3_stmt * selectStatement;
if (sqlite3_prepare_v2(sqlite.database, [sql UTF8String], -1, &selectStatement, NULL) == SQLITE_OK)
{
while (sqlite3_step(selectStatement) == SQLITE_ROW)
NSNumber *mobilePhone = [NSNumber numberWithInt:sqlite3_column_int(selectStatement, 4)];
NSLog(@"mobile phone %@", mobilePhone);
}
The result in log is 2015-02-21 18:05:55.171 Appointment Scheduler[40331:7035909] phone: 811965266
It's quite strange. Any help?
Aucun commentaire:
Enregistrer un commentaire