$model=M('');
$model->table(C('DB_PREFIX').'goods as g')
      ->join(C('DB_PREFIX').'orders as o on o.goods_id=g.id')
      ->where('o.user_id='.$userid.' and o.state=1 and o.id not in(select c.order_id from '.C('DB_PREFIX').'comment as c where c.user_id='.$userid.' and c.goods_id=g.id )')

 

相关文章:

  • 2021-08-30
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2021-07-16
  • 2022-02-28
  • 2021-10-18
  • 2021-12-18
猜你喜欢
  • 2021-11-04
  • 2021-08-21
  • 2021-05-17
  • 2022-02-20
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案