mysql - PHP T string error for sql statement -


i'm having strange error php code. says there unexpected t_constant_encapsed_string error, can't see it.

    $dateresult = mysqli_query($connection, 'select county, cuisine,     count(*) inspection, restaurant inspection.rid =      restaurant.rid , inspection.passfail = ''pass'' , idate '$date%'      group county, cuisine'); 

i'm assuming issue either pattern '$date%' or 'pass'.

thank you!

try conflicting ' , "

 $dateresult = mysqli_query($connection, "select county, cuisine,     count(*) inspection, restaurant inspection.rid =      restaurant.rid , inspection.passfail = 'pass' , idate '$date%'      group county, cuisine"); 

Comments