I am in need of some help. I am using FPDF, extracting data from a MS SQL Server 2014 table. I am using PHP v5.6.25.
I am rather confused about two columns that are giving me grief. One is a money column and the other is a date column.
The money column displays 4 decimals and I need to display it as 2 decimal places.
The date column will not display at all and it stalls the creation of the pdf.
With the date column, I decided to explode the date, reassemble it as a string in the order that I need to display, MM-DD-YYYY, and it will not display.
If I comment it out, it displays the PDF.
This is my select statement:
$sql = "select SupplierCode,ConfirmNbr,AmtRcvd,DateRcvd, Description,IDOC,InvoiceNbr from importCmsReceipts where AgencyId = $strAgencyId ";
And this is what I have tried as to displaying the date - doesn't work.
$strDateRcvd = $row['DateRcvd'];
$strArray = explode('-',$strDateRcvd);
$strDate = strval($strArray) . '-' . strval($strArray) .'-' . strval($strArray);
I am thinking I need to change my sql select statement to put both the money and date columns in the format that I need.
How can I fix this and what am I doing wrong with the date and money columns ??
Any help appreciated.