I want to show data using two conditions WHERE
, questions by categories and that these questions are enabled to the public.
I do the following:
$categoria = "categoria_uno";
$habilitado = "1";
$stmt = $conexion->prepare("SELECT id,pregunta,fecha FROM questions WHERE categoria=? AND WHERE habilitado=? order by id DESC");
$stmt->bind_param("si",$categoria,$habilitado)
But it shows me an error in the line: $stmt->bind_param("si",$categoria,$habilitado)
Showing me the following:
Fatal error: Call to a member function
bind_param()
on boolean
Because the error, that another parameter must pass in WHERE categoria=? AND WHERE habilitado=?