Lamez Posted January 13, 2008 Share Posted January 13, 2008 How do I delete a row from a mysql database in php? 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); 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); 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! 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
Archived
This topic is now archived and is closed to further replies.