Lamez Posted January 13, 2008 Share Posted January 13, 2008 How do I delete a row from a mysql database in php? Quote Link to comment https://forums.phpfreaks.com/topic/85771-solved-deleting-mysql-row-in-php/ Share on other sites More sharing options...
asmith Posted January 13, 2008 Share Posted January 13, 2008 $sql = "delete from table_name where column_name='Your_value'"; $result = mysql_query($sql); Quote Link to comment https://forums.phpfreaks.com/topic/85771-solved-deleting-mysql-row-in-php/#findComment-437760 Share on other sites More sharing options...
p2grace Posted January 13, 2008 Share Posted January 13, 2008 It's also good habit (although not always necessary) to use complete syntax: $query = "DELETE FROM `db_table` WHERE `row_id` = '$row_id'"; $run = mysql_query($query); Quote Link to comment https://forums.phpfreaks.com/topic/85771-solved-deleting-mysql-row-in-php/#findComment-437761 Share on other sites More sharing options...
Lamez Posted January 13, 2008 Author Share Posted January 13, 2008 oh ok thanks guys! Quote Link to comment https://forums.phpfreaks.com/topic/85771-solved-deleting-mysql-row-in-php/#findComment-437787 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.