S
S
Semyon Kataparov2016-04-24 21:05:00
PHP
Semyon Kataparov, 2016-04-24 21:05:00

What is the problem with getting out of the database?

Extract from db:

$query2 = "SELECT FROM users WHERE id = '$steamid'";
    $result2 = mysqli_query($connect, $query2);

    while($row1 = mysqli_fetch_array($result2)) {       #33 строка
        $balance = $row1['balance'];
    }

Gives an error message:
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\OpenServer\domains\localhost\index.php on line 33

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Silm, 2016-04-24
@truexizt1

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given

the mysqli_fetch_array() function expected the result mysqli_result as input, but received a boolean

A
Arthur, 2016-05-04
@arturka_v_10

$result2 = $mysqli->query("SELECT * FROM users WHERE id = '$steamid'");
while($row1 = $result2->fetch_array()){
$balance = $row1['balance'];
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question