php - SELECT does not selects -
this question has answer here:
i'm tryign creat user_login system website. , got problems selection of user_info database , using mysqli , prepared statements . problem , can't output . i'm using manual @ php.net . here have got moment:
<?php require_once 'php/includes/constants.php'; $connection = new mysqli(db_server, db_user, db_password, db_name)or die("error"); $phone = "0661488342"; $password = "1234"; $query = " select * userinfo phone = ? , password = ? limit 1"; $stmt = $connection->prepare($query); $stmt->bind_param('ss', $phone, $password); $stmt->execute(); $res = $stmt->get_result(); $row = $res->fetch_assoc(); echo "password = ".$row['password'];
the error :
call undefined method mysqli_stmt::get_result() in z:...
can advise me ?
edition 1 php version 5.2.12.(sorry, forgot this) question remains same . how can user_info ?
you need have php 5.3.0 , method requires mysqlnd driver. othervise error:
call undefined method mysqli_stmt::get_result()
which appears happening you.
Comments
Post a Comment