Forums

WHERE statement in CCv5?

Mileto 22 Feb, 2015
Hi
about this article https://www.chronoengine.com/faqs/72-ccv5/5215-how-do-i-build-a-where-statement-in-ccv5.html

I have two questions:

1) How can I do a where clause with OR operator (eg. ...where field=x or field=y)

2) Can you tell me what would be a case where you need to take a value from CFv5 to use in WHERE?

What is the case to use this functionality that is explain?
"Getting values in CFv5
ChronoForms v5 stores any values it has in the $form->data array and you can access the values using $form->data['variable_name']. So for example if you want to use the gcb variable passed back by CCv5 you might have a WHERE clause like this

<?php
return array('model_id.column' => $form->data['gcb']);
?>"

i think that this is a awesome functionality but how i can get data from CF to use in CC, i thinked the have sense only contrary....

thanks
Mileto 22 Feb, 2015
Ty calculus00
but it's some article to which I refer ๐Ÿ˜€ ๐Ÿ˜€
Max_admin 23 Feb, 2015
Hi Mileto,

If its the same field then just use IN:

array("field" => array("x", "y"));

But for OR you can use the following:

array("OR" => array("field1" => array("x", "y"), "field2" => "4"));


I couldn't understand the 2nd question!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.