Posted 06 January 2006 - 05:34 AM
BTW, you've asked about 10 separate questions in a single thread -- perhaps you should take the time to try and figure some of this out on your own time first to see how much you can get resolved in advance. All of the advice & suggestions you need to complete your task have been laid out already in this thread. Good luck.
Posted 06 January 2006 - 02:55 PM
$results=mysql_query("SELECT * FROM customers ORDER BY id ASC");
in front of the while and now the first result is showing up!
I'm not sure if you understood what I was trying to say with the decimal points, but the meaning of truncate is the opposite of what I'm trying to do. Truncate made the correct amount of decimals but they weren't correct.
I had it work for some numbers such as 31.9, but its also changing into 5.42 into 5.41. Whats it doing??? It should still say 5.42.
Posted 06 January 2006 - 06:43 PM
TRUNCATE() does exactly that, with no rounding. If you're getting 5.42 becoming 5.41, then that means the "underlying value" is probably 5.419, and whatever is giving you 5.42 is simply rounding. When you truncate, you just chop the number of N decimal places, so you'll get 5.41. Does that make sense?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users