i have an error. Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, bool given in C:xampphtdocsgudangfunction.php [closed]

Question
$conn = mysqli_connect("localhost", "root", "","gudang");

function query($query) {
    global $conn;
    $result = mysqli_query($conn, $query);
    $rows = [];
    while( $row = mysqli_fetch_assoc($result) ) {
        $rows[] = $row;
    }
    return $rows;
}

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/i-have-an-error-warning-mysqli_fetch_assoc-expects-parameter-1-to-be-mysqli_result-bool-given-in-cxampphtdocsgudangfunction-php-closed/">

i have an error. Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, bool given in C:xampphtdocsgudangfunction.php [closed]</a>
0
, filemon harwiadi 2 months 0 Answers 48 views 0

Leave an answer