sql - How to select data from database where today date between startdate and enddate? -
i working select data today date between startdate , enddate. have tried not work. can give me solution on it?
this have tried :
$stmt = "select tbl1.* "._const_tbl_vote." tbl1, "._const_tbl_vote_answer." tbl2" ; $stmt .= " ".$date." between tbl1.publishing_startdate , tbl1.publishing_enddate";
try adding '' around $date variable like
$stmt = "select tbl1.* "._const_tbl_vote." tbl1, "._const_tbl_vote_answer." tbl2" ; $stmt .= " '".$date."' between tbl1.publishing_startdate , tbl1.publishing_enddate";
Comments
Post a Comment