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. 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; 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'; 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... 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. 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. 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'? 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. 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. 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
Archived
This topic is now archived and is closed to further replies.