can someone help me to fix this error about query? i already googled some and fix the other error but this error, i can't fix it
MYSQLI_FETCH_ARRAY() EXPECT PARAMETER 1 to be MYSQLI_Result object given
below is my code
<?php if(!defined('FLUX_ROOT'))exit;?><?php
//SQL ConnectionfunctionConnection(){
$db_host="127.0.0.1";//insert the IP Address of your website
$db_name="rathena";//insert your database name insid the 2 double quotesS
$username="zxc";//insert the username of your phpmyadmin (SQL username)
$password="zxc";//insert the password of your phpmyadmin (SQL password)
$conn = mysqli_connect($db_host,$username,$password);if(!$conn){
echo "Connection failed!";returnfalse;}
mysqli_select_db($conn, $db_name);return $conn;}
$conn =Connection();if($conn){
$hpsql = mysqli_query($conn,"SELECT * FROM cp_onlinepeak ORDER BY users DESC LIMIT 1");
$hprow = mysqli_fetch_array($conn,$hpsql);
echo $hprow['users'];}
Question
Takuyakii
Good day rA,
can someone help me to fix this error about query? i already googled some and fix the other error but this error, i can't fix it
MYSQLI_FETCH_ARRAY() EXPECT PARAMETER 1 to be MYSQLI_Result object given
below is my code
Link to comment
Share on other sites
1 answer to this question
Recommended Posts