C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
PHP MySQL Delete RecordPHP mysql_query() function is used to delete record in a table. Since PHP 5.5, mysql_query() function is deprecated. Now it is recommended to use one of the 2 alternatives.
PHP MySQLi Delete Record ExampleExample'; $id=2; $sql = "delete from emp4 where id=$id"; if(mysqli_query($conn, $sql)){ echo "Record deleted successfully"; }else{ echo "Could not deleted record: ". mysqli_error($conn); } mysqli_close($conn); ?> Output: Connected successfully Record deleted successfully
Next TopicPHP MySQL SELECT
|