hi im following a tutorial for a block system and i have the following error i cannot fathom if anyone can help be must appreciated

heres the error msg:
mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /home/public_html/php_parsers/block_system.php on line 32

and heres the code in question

//
            $sql = "SELECT COUNT(id) FROM friends WHERE (userl='$log_username' AND user2='$blockee' AND 
            accepted='1') OR (user1='$blockee' AND user2='$log_username' AND accepted='1') LIMIT 1";
            $query = mysqli_query($db_conx, $sql);
            $rc = mysqli_fetch_row($query); ------ this is error line
            if ($rc[0] > 0) {
                $sql = "DELETE FROM friends WHERE (userl='$log_username' AND user2='$blockee' AND accepted='1') OR
                 (user1='$blockee' AND user2='$log_username' AND accepted='1') LIMIT 1";
                $query = mysqli_query($db_conx, $sql);
                }
                //

According the the php documentation, there is no function mysqli_fetch_row. There is mysqli_stmt_fetch. You need to review the documentation more closely. Look here: http://php.net/manual/en/mysqli-stmt.fetch.php

solved it went over code again this morning

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.