Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

yrvaken2

macrumors newbie
Original poster
Sep 15, 2008
12
0
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

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!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.