displaying numbers with .00 format

My field type is DECIMAL(6,2) in my case.code:

<?php $sql = "SELECT concat('', ticket_number, '') AS 'Ticket #', clientname AS 'Client', servcategory AS 'Issue Type', description AS 'Issue', DATE_FORMAT(ticket_date, '%m/%d/%Y') AS 'Date', status AS 'Status', totalhrs AS 'Hrs' FROM ticket WHERE tech = '".CurrentUserName()."' AND status <> 'Complete' ORDER BY ticket_number ASC;"; echo $dbhelper->ExecuteHtml($sql, array("fieldcaption" => TRUE, "tablename" => array("ticket"))); ?>It's returning whole numbers instead of floating values with precision 2.*Note - Have also tried FORMAT(totalhrs, 2) AS... with same result.

ampsys56 wrote:
Have also tried FORMAT(totalhrs, 2) AS…This should work. You may post your complete SQL for discussion.

Thanks for your reply.Complete sql is just as I posted already, but I’ll post again here. The field that is displaying whole number values and not DECIMAL(6,2) is totalhrs. It displays fine EVERYWHERE else in the app (list, view, etc), but only does this on the “dashboard.php” when invoking the $dbhelper->ExecuteHtml echo.Here they are in full.

  1. Without format function on SQL select statement:
<?php $sql = "SELECT concat('', ticket_number, '') AS 'Ticket #', clientname AS 'Client', servcategory AS 'Issue Type', description AS 'Issue', DATE_FORMAT(ticket_date, '%m/%d/%Y') AS 'Date', status AS 'Status', totalhrs AS 'Hrs' FROM ticket WHERE tech = '".CurrentUserName()."' AND status <> 'Complete' ORDER BY ticket_number ASC;"; echo $dbhelper->ExecuteHtml($sql, array("fieldcaption" => TRUE, "tablename" => array("ticket"))); ?>


2. And WITH format function on SQL statement:

<?php $sql = "SELECT concat('', ticket_number, '') AS 'Ticket #', clientname AS 'Client', servcategory AS 'Issue Type', description AS 'Issue', DATE_FORMAT(ticket_date, '%m/%d/%Y') AS 'Date', status AS 'Status', FORMAT(totalhrs, 2) AS 'Hrs' FROM ticket WHERE tech = '".CurrentUserName()."' AND status <> 'Complete' ORDER BY ticket_number ASC;"; echo $dbhelper->ExecuteHtml($sql, array("fieldcaption" => TRUE, "tablename" => array("ticket"))); ?>

Everything is perfect except the Hrs column which lists rows with rounded whole numbers instead of the precise decimal values.