Mysqli DELETE QUERY not working in PHP Script

后端 未结 2 1575
耶瑟儿~
耶瑟儿~ 2021-01-21 06:31

Im using the following code to remove an entry from a table what i want to do is to check if any value was deleted from the table.If one value is deleted,the script should print

2条回答
  •  醉酒成梦
    2021-01-21 06:54

    How about using execption. I also changed the code a little bit.

    getLine() . "): " . $e->
            getMessage();
    }
    $query = mysqli_query('DELETE FROM ktable WHERE code="' . $value . ';"');
        if ($query) {
    
            printf("Select returned %d rows.\n", $result->num_rows);
            printf($result->num_rows);
            mysqli_close();
        }
    ?>
    

提交回复
热议问题