Here down a sample of my program:
$mysqli = new mysqli($db_host, $db_username, $db_password, $db_name);
if ($mysqli -> connect_error) {
die('Error : ('. $mysqli->connect_errno .') '. $mysqli->connect_error);
}
if ($stmt = $mysqli -> prepare("SELECT c_id, c_name, c_pic,o_name, c_location, c_address, PIN, c_phone, c_email, c_category, c_message FROM client_detail WHERE c_category = ? AND active='yes'")) {
$stmt -> bind_param('s',$Data);
$stmt -> execute();
$stmt -> bind_result($c_id,$c_name,$c_pic,$o_name,$c_location,$c_address,$PIN,$c_phone,$c_email,$c_category,$c_message);
}
The problem arises when I am pass ?
as agument while if I pass a concrete value or variable, the query is running.
If I skip the where
the program also runs so why is the data is not bound to ?
?