dudejma Posted July 10, 2010 Share Posted July 10, 2010 I was wondering how to delete data in a table without going through phpMyAdmin. I would like to be able to push a button and it delete it. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/207314-how-to-delete-data-in-table/ Share on other sites More sharing options...
bh Posted July 10, 2010 Share Posted July 10, 2010 DELETE FROM table_name WHERE column = x; Quote Link to comment https://forums.phpfreaks.com/topic/207314-how-to-delete-data-in-table/#findComment-1083992 Share on other sites More sharing options...
robert_gsfame Posted July 10, 2010 Share Posted July 10, 2010 DELETE FROM table_name WHERE column = x; Â dont forget single quotes DELETE FROM table_name WHERE column = 'x'; Quote Link to comment https://forums.phpfreaks.com/topic/207314-how-to-delete-data-in-table/#findComment-1083994 Share on other sites More sharing options...
jskywalker Posted July 10, 2010 Share Posted July 10, 2010 if this 'column' is numeric, you will not need those single quotes... Quote Link to comment https://forums.phpfreaks.com/topic/207314-how-to-delete-data-in-table/#findComment-1083997 Share on other sites More sharing options...
dudejma Posted July 10, 2010 Author Share Posted July 10, 2010 What would I make 'x' and would I make a form? I'm wanting to have checkmarks for each line of data that I have showing from a table and when I'm done with that information, I'm wanting to check that checkmark and then push the delete button. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/207314-how-to-delete-data-in-table/#findComment-1084177 Share on other sites More sharing options...
fenway Posted July 10, 2010 Share Posted July 10, 2010 If you're asking how to write php script to do this, you're in the wrong forum. Quote Link to comment https://forums.phpfreaks.com/topic/207314-how-to-delete-data-in-table/#findComment-1084221 Share on other sites More sharing options...
dudejma Posted July 10, 2010 Author Share Posted July 10, 2010 I worded it wrong. Sorry! I meant to say how I'm wondering what I put in 'x'? Quote Link to comment https://forums.phpfreaks.com/topic/207314-how-to-delete-data-in-table/#findComment-1084230 Share on other sites More sharing options...
fenway Posted July 11, 2010 Share Posted July 11, 2010 Well, that depends what data you'd like to delete. Quote Link to comment https://forums.phpfreaks.com/topic/207314-how-to-delete-data-in-table/#findComment-1084473 Share on other sites More sharing options...
dudejma Posted July 12, 2010 Author Share Posted July 12, 2010 Nevermind. I moved some stuff around and got it to work. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/207314-how-to-delete-data-in-table/#findComment-1084689 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.