$stmt = $mysqli->prepare('select Un from member where Lock = ? and Activated = ?');
$stmt -> bind_param("ss", 'N', 'Y');//This line gave the error
$stmt -> execute();
$stmt->store_result();//apply to prepare statement
$numRows = $stmt->num_rows;
if ($numRows > 0)//if have result
while ($row = $stmt->fetch())
my above code gave me a "Call to a member function bind_param() on a non-object" error. I really don't get it why i getting this error. I have correct cols name.
I am new to mysqli and would like to learn how to debug such error.
- what is the problem with my prepare statement or bind_param()?
- Please teach me how to debug such error