I wanted to know if is there any solutions to delete multiple rows in one query?
I'm using a select element with multiple input so I have an array in my $_POST when I'm sending my form.
For example, I want to unsubscribe an users from one table to more than one lesson So I have:
users.id | lesson.id
--------------------
1 | 1
1 | 2
1 | 3
1 | 4
My select post me an array with the lesson.id:
Array
(
[0] => 2
[1] => 3
[2] => 4
)
How can I with only one query, delete all rows from my table ?
BTW, I know the users.id all the time.