Instale el programa XAMPP y sale este mensaje de error y hasta el momento no puedo solucionarlo
Warning: mysqli_stmt::bind_param(): Number of variables doesn't match number of parameters in prepared statement in D:\xampp\htdocs\server\enciclopedia\index.php on line 29
y el codigo que estoy utilizando es este:
$galNumb = 'SELECT COUNT(*) AS total FROM enciclopedia WHERE status = "1"';
$stmt = $mysqli->prepare($galNumb);
$stmt->bind_param('i', $pjInfo['total']);
if ( ! $stmt->execute()) {
trigger_error('The query execution failed; MySQL said ('.$stmt->errno.') '.$stmt->error, E_USER_ERROR);
}
$col1 = null;
$stmt->bind_result($col1); // you can bind multiple colums in one function call
while ($stmt->fetch()) { // for this query, there will only be one row, but it makes for a more complete example
$echo .= '<div class="enciclopediarow"><a class="title" href="/enciclopedia/review">Review</a><br>'.PHP_EOL;
$echo .= '<b>'.$col1.'</b> articulos aprovados</div>'.PHP_EOL;
}
$stmt->close(); // explicitly closing your statements is good practice
Especialmente en esta linea $stmt = $mysqli->prepare($galNumb);
Saludos