Jump to content

[SOLVED] Rounding numbers


ccrevcypsys

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.