MySQLi delete in multiply tables |
(07-01-2015, 02:10 PM)sparky672 Wrote:(05-20-2015, 03:20 PM)Narf Wrote: I didn't realize there was such an example in the documentation ... that may indeed make it a bug. The potential issues that you see, together with other factors (like not making it easy to delete from 10 tables by accident) are why I wouldn't consider this to be a good feature. Will have to look into it again, I guess. I am not happy about having to commit this, but it's obviously designed to do that and it's a BC break, so ... https://github.com/bcit-ci/CodeIgniter/c...d3dc82ee58 As for how to delete the same ID from multiple tables ... assuming you're not using foreign keys with ON DELETE CASCADE, just calling delete() in a foreach loop is just fine. And no, I don't care that it would be 3-4 lines instead of 1 - it guarantees that multiple deletes is what you want, and you didn't unknowingly pass an array or the wrong WHERE condition to delete(). |
Welcome Guest, Not a member yet? Register Sign In |