$sqlsave_pawn=mysql_query("SELECT *
FROM save_pawn AS a
INNER JOIN product AS b ON a.id_pro = b.id_pro
INNER JOIN product_status AS c ON a.id_proS = c.id_proS
INNER JOIN product_type AS d ON a.id_ptype = d.id_ptype WHERE d.id_ptype = $v1 LIMIT 0 , 5");
แต่ต้องการเพิ่มการ WHERE ในส่วนของ id_proS เข้าไปอีก โดยใส่คำสั่งแบบนี้
$sqlsave_pawn=mysql_query("SELECT *
FROM save_pawn AS a
INNER JOIN product AS b ON a.id_pro = b.id_pro
INNER JOIN product_status AS c ON a.id_proS = c.id_proS and c.id_proS IN (1,2)
INNER JOIN product_type AS d ON a.id_ptype = d.id_ptype WHERE d.id_ptype = $v1 LIMIT 0 , 5");