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, '...


2

You have the instruction in your code, but commented. The query setLimit() function requires two parameters: $limit: the number of records to return, and $offset: the first record you want to return, zero-based. This is the signature of the function: public function setLimit($limit = 0, $offset = 0) Please take notice that the parameter order is opposite ...


1

If you implement the code from my earlier code, then you only need to write a dynamic $having array to generate the correct HAVING clause. I must note that your current coding attempt is not stable/secure. You are receiving user-supplied data from $_POST and feeding it directly into your raw sql. This means that there are no validating or sanitising steps ...


1

I think the simplest way forward is to use a JOIN to relate your first query to your second query. An INNER JOIN (same as JOIN) will only generate rows in the result set where both "derived" queries have data. I am assuming that %%P1=0%% is your Plotalot placeholder. This was a late-night endeavour, so I cannot guarantee that it is fully refined, ...


1

This will rely heavily on the magic of a "pivot" technique. Here are some more examples in JSE to compare/contrast with https://joomla.stackexchange.com/questions/tagged/pivot. Basically, a WHERE clause will disqualify rows before grouping occurs. In this case, you only want to focus on data in the scope of FormId 14, so this should go in your ...


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