Hot answers tagged

2

From this sample data: INSERT INTO `o2pe0_rsform_submission_values` (`SubmissionValueId`, `FormId`, `SubmissionId`, `FieldName`, `FieldValue`) VALUES (2124732, 23, 47529, 'SHELTER', 'Bellville'), (2124728, 23, 47529, 'Amount', '500'), (2124731, 23, 47529, 'ClientID', 'G993HJOS'), (2124729, 23, 47529, 'Monthpayment', '2020-07-09'), (2124743, 23, 47530, '...


1

You can definitely delete rows from multiple tables in a single query, but Joomla doesn't offer a query-building technique to accommodate this. If you absolutely demand that query builder methods must be used, then you'll need to conduct some "surgery" (which isn't very pretty) on the generated query before executing it -- see https://joomla....


1

Why don't you do it in 2 steps? I would do something like the following code. As you can see I use name spacing (since Joomla 3.8), used quoteName the table + field names and added a try/catch block. use Joomla\CMS\Factory; public function delete_codes() { $id = $this->input->getInt('id'); $query = $db->getQuery(true) ->delete($db->...


Only top voted, non community-wiki answers of a minimum length are eligible