Hi. On Thu 2002-12-12 at 02:25:51 -0500, [EMAIL PROTECTED] wrote: > Hi, > > Not sure if this is a PHP of a MySQL question, so I am sending it to both > groups.
Usually it is preferred that you send it only to the list which is more appropriate first (toss a coin, if you must ;-) and only if you get no satisfying answer, try the other one. Cross-posting is usually frowned upon. > Basically I have a list of numbers with two decimal places in the > MySQL database, but I only want to display some of them with the > decimal points. > > i.e. > > 70 (not 70.00) > 87 > 51.5 > 46.75 > 12 > 29 > 5.5 > -1 > 45 > > I know it's probably a weird request, but any thoughts on how one would do > this either through PHP or MySQL. You can use TRIM for that purpose: SELECT TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM column)) ... HTH, Benjamin. -- [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php