Darkness Posted June 30, 2007 Share Posted June 30, 2007 Hello,Here I am again... Already. Anyways, lately, I have been having issues with Money and the sort. How should I do this? (Like, Money on an RPG, so you can buy Items). Some say I should store it in an SQL... The issue is: The money value has to be atleast 999,999,999. However, when I try to create a Longblob or Longtext (or any blobs or text fields), it won't work. Well, if you try to in a script, which I what I need to do, for certain reasons. Doubt it would even work if I created it from the database.Anyways, others have suggested using fopen. How could that be possible?Sorry if it's not quite clear.Thanks. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 30, 2007 Share Posted June 30, 2007 You're working with a number, you don't need a long blob. A long blob stores several megabytes of binary data, you don't need several megabytes of binary data to store a 9-digit number. Use an integer column if you only need whole numbers, if you need decimals then use a float. The database does not store commas so leave those out when you work with the number, use PHP to add the commas when you write the number on the page. Link to comment Share on other sites More sharing options...
Darkness Posted June 30, 2007 Author Share Posted June 30, 2007 Cool. However, integers seem to allow only 255 characters (BigInt). Oh, wait. Would that mean if I entered 9, it would allow me to use 9 digits in the number?Thanks. Link to comment Share on other sites More sharing options...
teng84 Posted June 30, 2007 Share Posted June 30, 2007 ya thats the limit Link to comment Share on other sites More sharing options...
Darkness Posted June 30, 2007 Author Share Posted June 30, 2007 I got it to work. I've improved on my skills a lot tonight.Thanks so much! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.