我得到以下信息
select p.*, (select paypal_status from tbl_order as o where paypal_status = 'paid' and end_time > now() and p.post_id = o.post_id) as sort_post from tbl_postad as p where post_category in ('1','7','14','20','26','32','38','44','50','56','62','68','74','80','97','140','144','150','177','179','235','259','284','298','334','370','397','410','429','450','467','479','495','522','535','543') and post_expiredate >= '2018-07-25 13:00:18' and post_delete_status!='Y' and post_cat_status!='N' and block = 0 and post_country = "India" and post_status = 'Y' order by post_date desc LIMIT 0, 15
SQL语法中有错误;请查看手册
对应于MySQL服务器版本,以便使用正确的语法
接近“post_”类别
('1','7','14','20','26','32','38','44','50','56','62','68','74''在
第1行
查询在phpmyadmin中正确执行:
'179','235','259','284','298','334','370','397','410','429'、'450'、'467'、'479'、'495'、'522'、'535'、'543')和post_expiredate>='2018-07-25 13:00:18'和post_delete_状态!“是”和后猫状态!='N'和block=0,post_country=“India”和post_status='Y'按post_date desc LIMIT排序的订单数量限制为0,15
即使是最短的查询也会返回错误:
select p.*, (select paypal_status from tbl_order as o where paypal_status = 'paid' and end_time > now() and p.post_id = o.post_id) as sort_post from tbl_postad as p where post_status='Y' order by post_date desc LIMIT 0, 15
SQL语法中有错误;请查看手册
对应于MySQL服务器版本,以便使用正确的语法
在第1行的“post_status=”Y“附近
我的PHP版本:PHP版本5.6.36