Home  |  Linux  | Mysql  | PHP  | XML
From:David Robley Date:Tue Mar  9 12:06:48 2010
Subject:Re: Rounding up results
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.

Navigate in group php.db at sever news.php.net
Previous Next


Your recent visits
Re: [PHP-DB] FW: semaphores WAS: [PHP-DB] Automatic logoff
PHP Help with pagination
Re: [PHP-DB] MIME Alternatimve Emails
Re: [PHP-WIN] Re: [PHP-DB] Cannot connect to MySQL
Re: [PHP-DB] Upgrading PHP Version 5.1.6



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants