Hey!
I want to store decimal numbers in the database. But I can not get my head around what type it should get in the sqlite database (real, double, float)?
And then how I get them out of the database. I have been trying to use a double from the database and then use the following code to get it ut it only print 0.000
Can someone please help me and show how to get a decimal number from a sqlite database?
Best regards!
I want to store decimal numbers in the database. But I can not get my head around what type it should get in the sqlite database (real, double, float)?
And then how I get them out of the database. I have been trying to use a double from the database and then use the following code to get it ut it only print 0.000
Code:
self.amount = [NSNumber numberWithDouble: sqlite3_column_double(init_statement, 4)];
Can someone please help me and show how to get a decimal number from a sqlite database?
Best regards!