How can I change my date format from 2008-11-10 to 11-10-2008 from within a MySql query? I also, need to format a number to two decimal places and add a comma for thousands in the same query. Don't need much do I?
Here's the Query:
$pdf->Table('SELECT
vtiger_invoice.invoice_no,
vtiger_invoice.invoicestatus,
vtiger_invoice.subject,
vtiger_invoice.total,
vtiger_invoice.invoicedate,
vtiger_invoicecf.cf_674
FROM
vtiger_invoice
Inner Join vtiger_invoicecf ON vtiger_invoicecf.invoiceid = vtiger_invoice.invoiceid
WHERE
vtiger_invoice.accountid = 4103
ORDER BY
vtiger_invoice.accountid ASC',$prop);
As you can see I am using it to make a table in a PDF using FPDF. Without the formatting it works fine.
I tried this:
'SELECT
vtiger_invoice.invoice_no,
vtiger_invoice.invoicestatus,
vtiger_invoice.subject,
vtiger_invoice.total,
vtiger_invoice.DATE_FORMAT(invoicedate(), '%m/%d/%Y'),
vtiger_invoicecf.cf_674
FROM
vtiger_invoice
But all I got was a blank screen. I haven't gotten to formatting the total field.
Thanks in advance for any suggestions.!
Here's the Query:
$pdf->Table('SELECT
vtiger_invoice.invoice_no,
vtiger_invoice.invoicestatus,
vtiger_invoice.subject,
vtiger_invoice.total,
vtiger_invoice.invoicedate,
vtiger_invoicecf.cf_674
FROM
vtiger_invoice
Inner Join vtiger_invoicecf ON vtiger_invoicecf.invoiceid = vtiger_invoice.invoiceid
WHERE
vtiger_invoice.accountid = 4103
ORDER BY
vtiger_invoice.accountid ASC',$prop);
As you can see I am using it to make a table in a PDF using FPDF. Without the formatting it works fine.
I tried this:
'SELECT
vtiger_invoice.invoice_no,
vtiger_invoice.invoicestatus,
vtiger_invoice.subject,
vtiger_invoice.total,
vtiger_invoice.DATE_FORMAT(invoicedate(), '%m/%d/%Y'),
vtiger_invoicecf.cf_674
FROM
vtiger_invoice
But all I got was a blank screen. I haven't gotten to formatting the total field.
Thanks in advance for any suggestions.!