tôi đã nhận lỗi này trong mã của tôi và tôi không biết làm thế nào để giải quyết nó mã của tôi:mysqli_query cảnh báo: mysqli_query() dự kiến tham số 1 được mysqli
<?php
session_start();
include_once"connect_to_mysql.php";
$db_host = "localhost";
// Place the username for the MySQL database here
$db_username = "root";
// Place the password for the MySQL database here
$db_pass = "****";
// Place the name for the MySQL database here
$db_name = "mrmagicadam";
// Run the actual connection here
$myConnection= mysql_connect("$db_host","$db_username","$db_pass") or die ("could not connect to mysql");
mysql_select_db("mrmagicadam") or die ("no database");
$sqlCommand="SELECT id, linklabel FROM pages ORDER BY pageorder ASC";
$query=mysqli_query($myConnection, $sqlCommand) or die(mysql_error());
$menuDisplay="";
while($row=mysql_fetch_array($query)) {
$pid=$row["id"];
$linklabel=$row["linklabel"];
$menuDisplay='<a href="index.php?pid=' .$pid . '">' .$linklabel. '</a><br/>';
}
mysqli_free_result($query);
?>
và đây là lỗi:
Warning: mysqli_query() expects parameter 1 to be mysqli, resource given in C:\xampp\htdocs\limitless\connect_to_mysql.php on line 17
bạn có thể giúp tôi xin vui lòng
Mẹo: sử dụng tính năng tìm kiếm để tìm kiếm thông báo lỗi chính xác mà bạn đang nhận được. Tôi có thể đảm bảo với bạn câu hỏi này đã được trả lời nhiều lần trước đây. – deceze