I'm getting Resource id #5 as the result when I echo $netprofit .. Here's my code. Just learning php so I'm not the savviest yet.
<?php
$netprofit = mysql_query ("SELECT c.*
FROM jem_invoice_payments
a
LEFT JOIN jem_invoice_products
b ON a.invoice_id
=b.invoice_id
LEFT JOIN jem_products
c ON b.product_id
=c.product_id
WHERE
a.payment_date
>= $altstartdate AND a.payment_date
<= $altenddate");
?>