I have used the following php mysqli database class PHP MYSqli class
In the below cases how can I use prepared statement
$qry = " SELECT * FROM Master WHERE CustomerID = $customer_id ";
$qry.= (!empty($type)) ? " and Type=? " : "";
$qry.= (!empty($status)) ? " and Status=$status " : "";
$qry.= (!empty($inline)) ? " and $inline " : "";
$qry.= " ORDER BY JobID DESC ";
$start = !(empty($limit)) ? ($list_limit[$limit] * $page) : 0;
$end = !(empty($limit)) ? $list_limit[$limit] : 20;
$qry.= " LIMIT $start,$end ";
//echo $qry;
return $results = $db->rawQuery($qry,array($type));
While performing the above operation getting error as
Warning: mysqli_stmt::bind_param(): Number of variables doesn't match number of parameters in prepared statement in /var/www/proj/lib/mydb.php on line 64