Re: Rounding up results

[email protected] (David Robley)
Newsgroups php.db
Message-ID <[email protected]>
Ron Piggott wrote:

> Is there a way to round up in mySQL?  This result may give 3.2 --- so I
> want the result to be 4?
> 
> SELECT  ( count(`reference`) / $items_per_page ) AS total_pages FROM
> `store_product_profile` WHERE `store_category_reference` =$reference AND
> `live` =1

Does your location not let you access the mysql documentation?

http://dev.mysql.com/doc/refman/5.1/en/mathematical-functions.html


Cheers
-- 
David Robley

<CTRL>-<ALT>-<DEL> is the key to success
Today is Pungenday, the 68th day of Chaos in the YOLD 3176.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.