全部代碼,我用它來篩選:有問題MySQL查詢如何通過多個ID的
$query18 = 'SELECT group_concat(id) as qc10 FROM tblorders WHERE date LIKE \'' . date ('Y-m-') . '%\'';
$result18 = mysql_query($query18);
$data18 = mysql_fetch_array($result18);
$qc10 = $data18['qc10'];
$query19 = "SELECT count(id) as qc11 FROM bl_orderitems WHERE orderid=$qc10";
$result19 = mysql_query($query19);
$data19 = mysql_fetch_array($result19);
$ query19看起來是這樣的:
'SELECT count(id) FROM bl_orderitems WHERE orderid=7,6,8,9,10,11,12,13,14';
但它不工作。我如何列出這些ID以便實際工作?
謝謝!
謝謝,作爲魅力! – ProDraz 2012-01-17 02:47:50