TP6,sql语句查询PID为1跟2的所有数据,sql怎么写。and跟Or加哪里?

            $where[] = ['c.contentseries_id', '=', 369];

我想要得到c.contentseries_id = 368跟369的所有数据。
上面只能得到369的,我试过

$where[] = ['c.contentseries_id', '=', 369 and 'c.contentseries_id', '=', 368];

or
$where[] = ['c.contentseries_id', '=', 369 or 'c.contentseries_id', '=', 368];

都没用

阅读 2k
1 个回答
$where[] = ['c.contentseries_id', 'in', [368, 369]];
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题