I have almost lakhs of records in DB....I want to select the records based on some conditions..like
$val is an array...so I have some options like this
using for loop
for(){
SELECT * FROM TABLE WHERE ID IN($val[$i]);
}
otherwise concatenation ...like
$value=$val[$i].','.$val[$i];
SELECT * FROM TABLE WHERE ID IN($value);
or I can go for OR condition
SELECT * FROM TABLE WHERE(ID=$value1 OR ID=$value);
Which is the best solutions??