Need number format on bindings
I am working with an e-cart database. I am writing some custom code per client request.
I am writing a SUM on the OrderAmount and it is giving me the correct information, filtered by the coupon code (OrderTrackingNumber, per help from Ray today). However my report is showing many digits past the decimal point.
I have examined how it shows up in WA results page but can't find where in those page codes it is doing a limitation to 2 decimals.
should really be 31.84 ($31.85)
My query is
$query_july4 = "SELECT SUM(orders.OrderAmount) FROM orders WHERE OrderTrackingNumber LIKE '%JULY4%'";
$july4 = mysql_query($query_july4, $gator) or die(mysql_error());
$row_july4 = mysql_fetch_assoc($july4);
$totalRows_july4 = mysql_num_rows($july4);
and php is
<p><?php echo $row_july4['SUM(orders.OrderAmount)']; ?></p>
My research says I need to define number_format as in 12345, 2 but I am not sure where that comes into play. Top of page? How to write it? Or in the php echo?
Any help is most appreciated.