I have 2 variable holding dates. I am getting a syntax error in the SQL statement when I use the variables.
$from_date = '2013-02-13';
$to_date = '2013-02-20';
$query="SELECT * FROM mytable where datex >= ".$fromdate." AND datex <= ".$todate.";
Help me identify and correct this syntax error?
Thanks.