I want to insert more than one row into a table. I can do the for loop but Im trying to avoid querying many times. But Im not able to get this to work:
I don't think that would work.. it definitely won't work without semicolons to seperate the commands.. but I do know that mysql at least allows multiple inserts like how I wrote it.
You can compound multiple inserts together as shown above, you can't issue a SELECT and a DELETE in the same statement though, what would be passed back to PHP? How do you know which part of you query failed (or succeeded)? You want the result set from the SELECT and a TRUE/FALSE from the DELETE.