todayme Posted March 22, 2007 Share Posted March 22, 2007 Could someone please show me how to delete records from mysql. Maybe even an example in a loop that deletes records based on a criteria. Quote Link to comment https://forums.phpfreaks.com/topic/43785-how-do-you-delete-records-from-mysql/ Share on other sites More sharing options...
mem0ri Posted March 22, 2007 Share Posted March 22, 2007 Syntax: DELETE FROM table WHERE condition For more info, go to http://www.mysql.com, click 'documentation', and search for "DELETE SYNTAX" Quote Link to comment https://forums.phpfreaks.com/topic/43785-how-do-you-delete-records-from-mysql/#findComment-212584 Share on other sites More sharing options...
PC Nerd Posted March 22, 2007 Share Posted March 22, 2007 isnt it DROP cant remember whether DROP is for racords of fields goodluck Quote Link to comment https://forums.phpfreaks.com/topic/43785-how-do-you-delete-records-from-mysql/#findComment-212592 Share on other sites More sharing options...
Iceman512 Posted March 22, 2007 Share Posted March 22, 2007 Hi there, Here's an excellent resource for a solid grounding in DELETE for PHP, MySQL: http://www.w3schools.com/php/php_mysql_delete.asp Otherwise, the query will have to look something like this: mysql_query("DELETE FROM Person WHERE LastName='Griffin'"); Regards, Iceman Quote Link to comment https://forums.phpfreaks.com/topic/43785-how-do-you-delete-records-from-mysql/#findComment-212640 Share on other sites More sharing options...
bilis_money Posted March 22, 2007 Share Posted March 22, 2007 drop is deleting the entire table or database. Quote Link to comment https://forums.phpfreaks.com/topic/43785-how-do-you-delete-records-from-mysql/#findComment-212641 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.