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 Quote Link to comment Share on other sites More sharing options...
Jessica Posted August 30, 2007 Share Posted August 30, 2007 http://php.net/round Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.