我需要一个小的修复查询请帮助我,没有修复。请参阅底部,我的示例代码,感谢所有帮助者..
ny_xd_satilanlar database rows
id---uyid---toplam---sipno
01---16---1---1237777777
02---30---3---1301275922
03---30---2---1301741801
04---11---4---1123467988
//NOT WORK RETURN : 0 (zero)
$total_urun = mysql_fetch_array(mysql_query("SELECT SUM(adet) as toplam FROM ny_xd_satilanlar WHERE sipno IN ('{$curTel['sipnolar']}') AND uid='{$urunid}'"));
$total_urun = $total_urun[toplam];
// EXAMPLE 1 = NOT WORK RETURN : 0 (zero) HOW TO FİX QUERY ????
SELECT SUM(adet) as toplam FROM ny_xd_satilanlar WHERE sipno IN ('1237777777,1301275922,1301741801') AND uid='30'
// EXAMPLE 2 = NOT WORKİNG TRUE RETURN : 3 (three) HOW TO FİX QUERY ????
SELECT SUM(adet) as toplam FROM ny_xd_satilanlar WHERE sipno IN ('1301275922,1301741801') AND uid='30'
// EXAMPLE 1 ALTERNATİVE QUERY = OK WORK RETURN 3+2= :5 (five)
SELECT SUM(adet) as toplam FROM ny_xd_satilanlar WHERE (sipno='1237777777' OR sipno='1301275922' OR sipno='1301741801') AND uid='30'
需要修复第二个查询??