New answers tagged

0

It seems that if you want to delete one or more tables in a DELETE query containing a JOIN, you will need to specify the table(s) to delete between DELETE and FROM. https://stackoverflow.com/q/2763206/2943403 Joomla's delete() method does not provide the necessary output - as you have discovered. If you wish to patch the output from the query methods, ...


1

A MySQL DELETE query doesn't have a column value between keywords DELETE and FROM. There is also no benefit to declaring a table alias. owner is a mysql keyword, but not a RESERVED keyword, so it doesn't need to be backtick-wrapped. $db = Factory::getDBO(); try { $query = $db->getQuery(true) ->delete("#__mycomponent_user_posts") ...


Top 50 recent answers are included