Multiple WHERE with dates


I am trying to get my mysql query working and it says it is empty, which is impossible because I am picking information that I KNOW is in the table. What I am trying to do is to get 2 date variables from my form and to search my table within those dates. I do not know if it matters, but my table fields also have h:m:s while my date variables don’t. I have tried many variances but continue to fail. Can anyone help me please.
$frmQuery1101 = “SELECT tblTable1.fldField00, tblTable1.fldField19, tblTable1.fldField27, tblTable2.fldField00, tblTable2.fldField01, tblTable2.fldField02, tblTable2.fldField03, tblTable2.fldField04, tblTable2.fldField05 FROM tblTable1, tblTable2 WHERE (tblTable1.fldField00 = tblTable2.fldField00) AND WHERE tblTable2.fldField02 BETWEEN $frmDate01 AND $frmDate02 ORDER BY tblTable1.fldField19,tblTable1.fldField00”;

you have a syntax error in your SQL statement

replace the $variables with actual values, and run it directly in mysql, i.e. outside of php, so that you can obtain the mysql error message

don’t try to make a query work inside a php script if the query itself has errors – debug it first