ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

WHERE statement in CF7

ieraora 09 Mar, 2022
Hi. At this link we have instruction for WHERE Statement in CF / CC 5.
https://www.chronoengine.com/faqs/72-chronoconnectivity/ccv5/5215-how-do-i-build-a-where-statement-in-ccv5
But in CF7?
In read data I read this note:
PHP code without tags to return an array of conditions, e.g: return [ ["field_1", 1, "="],["field_2", 2, "!="]];

Ok, But this code, that I read in previous faq:

return array (":model.column = 'value' OR model.column_2 = 'value_2'");

what syntax has in CF7?

and this?

return array( 'model_id.column' => array('some value', 'another value', . . . ) );

Thank you for your reply.
Max_admin 11 Mar, 2022
The Where conditions setting in v7 is advanced enough, why do you need to use PHP ?
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Max_admin 13 Mar, 2022
Hi,

If you want to have conditional conditions as posted by email, then you need PHP, the conditions should be in this format:
return [["field", "value", "=="], "AND", ["field2", "xxx", "!="]];
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
ieraora 13 Mar, 2022
Answer
Ok, thank you, to be precise is:

return [["field", "value", "="], "AND", ["field2", "xxx", "!="]]; With "==" don't work.

So, for my work is

return [["field", "value", "="], "OR", ["field2", "xxx", "!="]];

Can I suggest to change description in read data (PHP code without tags to return an array of conditions, e.g: return [["field_1", 1, "="],["field_2", 2, "!="]];) ??

Thank you
You need to login to be able to post a reply.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com