如何在PHP中构造NotIn查询? [英] How is a NotIn Query Constructed in PHP?
本文介绍了如何在PHP中构造NotIn查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在PHP中构建以下给定的查询?
来自dealerprice的SELECT产品其中product = NotIn(选择productdetailidproductdetail from dpmixhasproductdetail1);
How should the below given Query be constructed in PHP?
SELECT product from dealerprice Where product=NotIn(select productdetailidproductdetail from dpmixhasproductdetail1);
推荐答案
hi,
能否正确编写子查询?
理想情况下查询应如下所示
Can you please write the sub query properly ?
Ideally query should be like as below
qry = mysql_query('从dealerprice中选择产品NOT IN('。。implode(,,
qry = mysql_query('SELECT from dealerprice where product NOT IN ('".implode(",",
array_of_id)。)');
array_of_id).")');
>
这篇关于如何在PHP中构造NotIn查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文