ccrevcypsys Posted August 30, 2007 Share Posted August 30, 2007 Im just wondering exactly how to round a number here is the code im using for the points. $artist=$db->select("select cc_artist.customer_id,cc_artist.points from cc_artist LEFT JOIN ".$glob['dbprefix']."CubeCart_customer on cc_artist.customer_id=".$glob['dbprefix']."CubeCart_customer.customer_id where cc_artist.customer_id=".$ccUserData[0]['customer_id']); $lottery = $db->select("SELECT sum(lotterypoints) as lpoints FROM ".$glob['dbprefix']."CubeCart_order_inv LEFT JOIN ".$glob['dbprefix']."CubeCart_order_sum on ".$glob['dbprefix']."CubeCart_order_sum.cart_order_id = ".$glob['dbprefix']."CubeCart_order_inv.cart_order_id INNER JOIN ".$glob['dbprefix']."CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix']."CubeCart_customer.customer_id WHERE ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$ccUserData[0]['customer_id']); $pointsUsed =0; $pointsEarned = 0; $currentPoints = 0; $pointsEarned = $atrist[0]['points']+$lottery[0]['lpoints']; $currentPoints = $pointsEarned-$pointsUsed; or is it in the mysql Link to comment https://forums.phpfreaks.com/topic/67360-solved-rounding-numbers/ Share on other sites More sharing options...
Jessica Posted August 30, 2007 Share Posted August 30, 2007 http://php.net/round Link to comment https://forums.phpfreaks.com/topic/67360-solved-rounding-numbers/#findComment-337939 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.