I got this error in my code and I don t know how to solve it my code:
<?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);
?>
这是错误:
警告:我的sqli_query()预计参数1为我的sqli,在C:xampphtdocslimitlesslink_to_mysql.php第17条下提供的资源
What I am doing wrong?