Number of bind variables doesn't match number of fields in prepared statement 代码如下:
<?php
$mysqli = new mysqli("localhost","root","123456", "gfgd",3308);/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}$admin1 = "admin";/* create a prepared statement */
if ($stmt = $mysqli->prepare("SELECT * FROM admin a WHERE a.admin_no=?"))
{    /* bind parameters for ers */
    $stmt->bind_param("s", $admin1);    /* execute query */
    $stmt->execute();    /* bind result variables */
    $stmt->bind_result($district);  echo $district;
    /* fetch value */
    //$stmt->fetch();
    /* close statement */
    $stmt->close();
}/* close connection */
$mysqli->close();
?> ?>