PHP not recognising MySQL fields

wxdqz

New Member
Hi,

I'm using the following SQL statement:

$sql1 = "SELECT ID, DATE_FORMAT(request_date, '%e %M %Y') AS request_date_fmtd, name, postcode, house_no, telephone, sales_office, valuation_date FROM valuations WHERE valuation_date = '0000-00-00' HAVING sales_office = '$sales_office' ORDER BY request_date_fmtd ASC";

in a PHP app.

I'm getting Parse error: parse error, expecting `STRING' or `NUM_STRING' or `'$'' when the compiler hits this line:

printf(" <td width=\"125\" bgcolor=\"%s\">%s</td>\n, $rowcolor, $row["request_date_fmtd"]);

Any ideas?

Thanks,

StuG
 
Back
Top