簡體   English   中英

就mysqli_result()而言,此mysql_result()的等效項是什么?

[英]What is the equivalent of this mysql_result() in terms of mysqli_result()

$query = "SELECT `uid` FROM `userdata` WHERE `username` = '$username' AND `password` = '$password'";
$query_run = mysqli_query($con, $query);

注意:-$ con = mysqli_connect($ host,$ user,$ pword);

$query_num_rows = mysqli_num_rows($query_run);
$user_id = mysql_result($query_run,0,'uid');//How do convert this line to mysqli_result() function???

答案是:-更換線

$user_id = mysql_result($query_run,0,'uid');

$row = mysqli_fetch_assoc($query_run);
            echo $row['uid'];                             

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM