Install the XAMPP program and get this error message and so far I can not fix it
Warning: mysqli_stmt :: bind_param (): Number of variables does not match number of parameters in prepared statement in D: \ xampp \ htdocs \ server \ encyclopedia \ index.php on line 29
and the code I'm using is this:
$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
Especially in this line $stmt = $mysqli->prepare($galNumb);
Greetings