I have this sql query..
select i.invoiceid as transactionid, i.date, i.total,
'invoice' as transaction_type
from invoice
and I ran it in php and echo out the total in a foreach loop like so....
echo gettype($row['total']) . "<br/>";
and all the totals returned string
how would I convert the i.total in my sql query to int or float?
i've tried
convert(int, i.total)
and that didnt work :(