Предупреждение: mysqli_error () ожидает ровно 1 параметр, 0 с учетом ошибки [closed]

Я следую руководству, однако автор руководства не отвечает на вопросы - но вот мой запрос

Я получаю следующую ошибку Предупреждение: mysqli_error () ожидает ровно 1 параметр, 0 задано, проблема в этой строке кода -

$query = mysqli_query($myConnection, $sqlCommand) or die (mysqli_error()); 

Весь код

session_start();

require_once "scripts/connect_to_mysql2.php";

//Build Main Navigation menu and gather page data here

$sqlCommand = "SELECT id, linklabel FROM pages ORDER BY pageorder ASC";

$query = mysqli_query($myConnection, $sqlCommand) or die (mysqli_error()); 

$menuDisplay = '';
while ($row = mysqli_fetch_array($query)) { 
    $pid = $row["id"];
    $linklabel = $row["linklabel"];

    $menuDisplay .= '<a href="index.php?pid=' . $pid . '">' . $linklabel . '</a><br />';

} 
mysqli_free_result($query); 

Включенный файл имеет следующую строку

$myConnection = mysqli_connect("$db_host","$db_username","$db_pass","$db_name") or die ("could not connect to mysql"); with reference to $myConnection, why do I get this error?

Спасибо

14
задан Aasim Azam 29 September 2011 в 16:13
поделиться