For some reason i can not get php/mysql to do JOIN with a between option. Am i over looking something again?
When i run this script all i get is a whit page with no errors on it....?
Any ideas would help!
$start = date("m/1/Y");
$end = date("m/31/Y");
header('Content-Type: text/csv; charset=utf-8');
header('Content-Disposition: attachment; filename=data.csv');
$output = fopen('php://output', 'w');
fputcsv($output, array('ID', 'P.O #', 'Date', 'To', 'Time', 'Vin', 'Reason', 'Amount', 'Employee #', 'Mananger', 'Account #', 'Store Location', 'Borrowed', 'verified','Adjustment','Adjustment by','','VOID','Emp Name'));
mysql_connect('*********', '**********', '***********');
mysql_select_db('donavons_car_scanner');
$rows = mysql_query('SELECT fpo.*, users.name FROM fpo WHERE date BETWEEN '" . $start . "' AND '" . $end . "' LEFT OUTER JOIN users ON (fpo.empnum = users.empnum)');
while ($row = mysql_fetch_assoc($rows)) fputcsv($output, $row);
Thank you!