简体   繁体   中英

Prepared Statement in PHP not binding results

When I am trying to get this prepared statement to work I am just testing to get data back it is telling me there is not a matching number of bind_results() from the prepared statement. I cannot figure this our there are three selected elements and three elements in the bind_results();

$sql_join_group_data = "SELECT `group_id`, `group`, `group_pass` 
                        FROM `groups` WHERE `group` = 'Knights'";
$stmt4 = $conn->prepare($sql_join_group_data);
$stmt->execute();
$stmt->bind_result($group_id, $group, $group_password);

您正在将语句分配给$stmt4但尝试从$stmt执行并绑定。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM