警告:mysqli_fetch_assoc()期望参数1为mysqli_result,在第40行的C:\ xampp \ htdocs \ serverland.com \ inculdes \ blogpost.php中给出null

I get the following error message:

mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given

With the following code:

$postTags="NO Tags";
    if(!empty($id)){
    $query = mysql_query($con,"SELECT tags.* FROM blog_post_tags LEFT JOIN (tags) ON (blog_post_tags.tag_id = tags.id) WHERE blog_post_tags.blog_post_id = " . $id);  
    $tagsArray=array();
    $tagsIdArray=array();
    while($row = mysqli_fetch_assoc($query)){
        array_push($tagsArray, $row["name"]);
        array_push($tagsIdArray, $row["id"]);
    }

try to do this Use [mysqli_query] at line: 3

$query = mysqli_query($con,"SELECT tags.* FROM blog_post_tags LEFT JOIN (tags) ON (blog_post_tags.tag_id = tags.id) WHERE blog_post_tags.blog_post_id = " . $id);