Skip navigation links

MySQL Forums :: MySQL Query Browser :: Can I format Query Output?


Advanced Search

Can I format Query Output?
Posted by: Argenex Kronium ()
Date: May 05, 2006 08:03PM

For example, I have long numbers like the following number stored within the database (result of a calculation):

187.74358342608

Is there a MySQL function or a PHP function that I can do to format the number so it displays as a percentage instead? I.E. the number itself is a percentage, but I would like to round the bastards off if you know what I mean.

Where the percentage of this number would be 188%

For the life of me I cannot seem to locate anything anywhere that lists functions of formating the output result of a query. I'm just displaying this stuff in html, nothing too exciting, and I only need the numbers rounded down. I suppose I could spend the 30 hours reformating the data in the db, but that sorta defeats the concept of having dynamic data.

Thanks if anyone can point me in the right direction,
-Arg

Options: ReplyQuote


Subject Written By Posted
Can I format Query Output? Argenex Kronium 05/05/2006 08:03PM
Re: Can I format Query Output? Bob Field 05/05/2006 08:42PM
Re: Can I format Query Output? Argenex Kronium 05/06/2006 07:08PM
Re: Can I format Query Output? Bob Field 05/06/2006 07:12PM
Re: Can I format Query Output? kumar Devarajan 05/06/2006 04:08AM
Re: Can I format Query Output? Bob Field 05/06/2006 08:19AM
Re: Can I format Query Output? Dan Yocum 06/03/2008 01:38PM
Re: Can I format Query Output? Dan Yocum 06/03/2008 01:56PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.