Web Hosting Talk







View Full Version : ask about SQL


bosen
01-15-2006, 03:55 AM
hello,

i got problem with sql, i have no idea about it at all as i am new into it.
here is the problem i have an afiliate script that got an error on decimal, when i put amount usd 20000, it just display 20.00
when i check on the sql, i get

payment decimal(10,2) NOT NULL default '0.00',

any expert here may help me please ?

thank you

Burhan
01-15-2006, 05:11 AM
How are you retrieving it and displaying it? Seems to work fine:

mitchlrm
01-15-2006, 09:28 AM
try entering 200000.00

bosen
01-15-2006, 09:16 PM
hello mitchlrm.

when i add 200000.00 it comes 200 USD but when i try add more zero like 20000000.00 it back to 20 USD again

orbitz
01-16-2006, 12:31 AM
the problem could be the coding? post up here part of the codes on how the price is retrieved and displayed

stuffradio
01-16-2006, 01:08 AM
I suggest using the ceil function. I hope this function would work for you. For more info on this function go to http://ca.php.net/ceil and it tells you how to use it in your code anything you need else ask here.

bosen
01-16-2006, 01:14 AM
ok, thank your for all your reply, i'll double check the code and will share again here when facing a problem

cheers