I am programming something like e-mail for my users. I want to allow people to select letters and delete selected. How can I do it? I can’t imagine how can I do it only with one MySQL query. Is it even possible?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If by “select” and “delete” you mean the SQL commands
SELECTandDELETE, then you don’t need to SELECT and DELETE at the same time. First run a SELECT to display the emails and to allow the user to choose which emails they want to delete. Then use the ids of the emails (usually a hidden field) to run a DELETE with aWHERE id IN (..., ..., ...).