“Ostrzeżenie: mysqli_fetch_array () spodziewa się parametru 1 będzie mysqli_result, ciąg podany w” Kod odpowiedzi

OSTRZEŻENIE: mysqli_fetch_all () spodziewa się parametru 1 będzie mysqli_result, bool podany w c: \ newxammp \ htdocs \ uczył się \ index.php on wiersz 11

#where you are running mysqli_query , add 'or die( mysqli_error($db)'
#e.g
$sql = "SELECT * FROM users";
$result = mysqli_query($db, $sql) or die( mysqli_error($db));
#$db being the variable holding the connection to db
Nagraj!

Ostrzeżenie: mysqli_fetch_array () spodziewa się parametru 1 będzie mysqli_result, ciąg podany w

$sql = "select * from privinsi";
$result = mysqli_query($connection,$sql);
while($r = mysqli_fetch_array($result))
{
    // your code here
}
Alert Antelope

Ostrzeżenie: mysqli_fetch_array () spodziewa się parametru 1 będzie mysqli_result, ciąg podany w

 mysqli_fetch_array($query)
Homeless Hyena

Ostrzeżenie: mysqli_fetch_array () spodziewa się parametru 1 będzie mysqli_result, ciąg podany w

mysqli_fetch_array($result) 
Homeless Hyena

Ostrzeżenie: mysqli_fetch_array () spodziewa się parametru 1 będzie mysqli_result, ciąg podany w

mysqli_fetch_array()'s 1st parameter must be a result of a query. What you are doing is you are passing the connection (which doesn't make sense) and the query command itself.

To fix this, execute the query first, then store the result to a variable then later fetch that variable.

$sql = "select * from privinsi";
$result = mysqli_query($connection,$sql);
while($r = mysqli_fetch_array($result))
{
    // your code here
}
Precious Pigeon

Odpowiedzi podobne do “Ostrzeżenie: mysqli_fetch_array () spodziewa się parametru 1 będzie mysqli_result, ciąg podany w”

Pytania podobne do “Ostrzeżenie: mysqli_fetch_array () spodziewa się parametru 1 będzie mysqli_result, ciąg podany w”

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu