Jquery datepicker with Ajax is not working

前端 未结 1 443
野趣味
野趣味 2021-01-27 11:21

In my website there are many categories. Each category page have their posts. Here I used jQuery datepicker, if user want to see Aug 20th posts, they click particular date on ca

相关标签:
1条回答
  • 2021-01-27 11:51
    <?php if(isset($_REQUEST['datepost']))
     {
     $date = date('m/d/Y',strtotime($_POST['date']));
    
     $res=mysql_query("SELECT * FROM  `wp_posts` WHERE DATE_FORMAT(post_date,  '%m/%d/%Y' ) =  $date AND post_type = 'post'  ORDER BY post_date DESC");
     $pageposts=mysql_fetch_array($res);
    
     exit();
     }  
    ?>
    

    Provide actual value for post_date column like DATE_FORMAT(post_date, '%m/%d/%Y' ) = $date

    0 讨论(0)
提交回复
热议问题