$client = $db -> prepare('SELECT CLIENT_ID, CLIENT_NAME FROM client WHERE CLIENT_NAME LIKE "%?%"');
$query = $_GET['query'];
$client -> bind_param('s', $query);
$client -> execute();
$client -> bind_result($client_id, $client_name);
while($client -> fetch()){
$d['suggestions']['value'] = $client_name;
$d['suggestions']['data'] = $client_id;
}
$client -> free_result();
I received the following error in the above statement. Can't see what caused the error.
<b>Warning</b>: mysqli_stmt::bind_param(): Number of variables doesn't match number of parameters in prepared statement in <b>getclient.php</b> on line <b>15</b><br />
<br />
<b>Notice</b>: Undefined index: callback in <b>getclient.php</b> on line <b>24</b>
Now I have another error message:
Call to a member function bind_param() on a non-object