php - select where clause in mysql when dynamic multiple values coming -
i able query when single value coming $mpfid
. getting multiple values dynamically drop down. how query when multiple $mpfid
values coming.
$mpfid= ['2','9','1','3'];
here have added 4 values in array based on user selection may come 1 or more.
$mpfid= ['2','9','1','3']; function getpfrelatedreleaseidfromsprint($mpfid) { $getquery="select * sprint `platform_id`='".$mpfid."'"; $result=mysql_query($getquery,$this->dbcon); return $result; }
please me how query when multiple values coming
you can use in
in where
clause :
select * sprint `platform_id` in ('" . implode("','",$mpfid) . "')
Comments
Post a Comment