dflow Posted February 11, 2012 Share Posted February 11, 2012 is it possible to include a condition in a query for specific . for example : if the product is from SupplierID=10 return only if Show=1 i want to search the whole DB Select ID FROM products WHERE Price=100 AND Condition ( if products.SupplierID=10 Show=1) hope i explained myself enough Link to comment https://forums.phpfreaks.com/topic/256906-inquery-condition/ Share on other sites More sharing options...
requinix Posted February 11, 2012 Share Posted February 11, 2012 if (the supplier ID is 10 and show = 1) OR (the supplier ID isn't 10) Link to comment https://forums.phpfreaks.com/topic/256906-inquery-condition/#findComment-1317089 Share on other sites More sharing options...
dflow Posted February 12, 2012 Author Share Posted February 12, 2012 if (the supplier ID is 10 and show = 1) OR (the supplier ID isn't 10) well i wasn't clear enough the Show parameter is only set for SupplierID=10 but i still want the results from the other suppliers Link to comment https://forums.phpfreaks.com/topic/256906-inquery-condition/#findComment-1317173 Share on other sites More sharing options...
requinix Posted February 12, 2012 Share Posted February 12, 2012 Nope, you were clear. Link to comment https://forums.phpfreaks.com/topic/256906-inquery-condition/#findComment-1317176 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.