Hi,
maybe I'm stupid, but I don't understand how to put the mysql query into the DB Read Condition field with a php array.
The demo doesn't show an example and in the forum here (which shows the results limited to 20 topics on 1st page) I found just this example <?php return array('id' => '17'); ?>, which of course works fine if you have only one condition.
But how to put something simple of mysql query like
"WHERE field1=cond1 AND field2=cond2 ORDER BY field1 ASC" into that php syntax?
Thanks again for your advice.
Kind regards,
Herbert
maybe I'm stupid, but I don't understand how to put the mysql query into the DB Read Condition field with a php array.
The demo doesn't show an example and in the forum here (which shows the results limited to 20 topics on 1st page) I found just this example <?php return array('id' => '17'); ?>, which of course works fine if you have only one condition.
But how to put something simple of mysql query like
"WHERE field1=cond1 AND field2=cond2 ORDER BY field1 ASC" into that php syntax?
Thanks again for your advice.
Kind regards,
Herbert
Hi Herbert,
Please check this:
https://www.chronoengine.com/faqs/72-ccv5/5215-how-do-i-build-a-where-statement-in-ccv5.html
You may place any order fields in the "Order" box!
Regards,
Max
Please check this:
https://www.chronoengine.com/faqs/72-ccv5/5215-how-do-i-build-a-where-statement-in-ccv5.html
You may place any order fields in the "Order" box!
Regards,
Max
VERY useful info in the FAQ, I'm very pleased with the DB Read functionality in CronoForms v5.
I've had to be a little fancier with my queries in the last few projects I've worked on, your FAQ & component are greatly appreciated.
random-members.html?categories[]=Antiques&categories[]=Not%20a%20Category
Thanks,
Jared
I've had to be a little fancier with my queries in the last few projects I've worked on, your FAQ & component are greatly appreciated.
random-members.html?categories[]=Antiques&categories[]=Not%20a%20Category
<?php
$categories = $form->data['categories'];
$db =& JFactory::getDBO();
$clean = implode(',', $db->quote($categories));
return array(":CategoryOne NOT IN ($clean) AND CategoryTwo NOT IN ($clean) AND CategoryThree NOT IN ($clean) ORDER BY RAND() LIMIT 1");
?>
Thanks,
Jared
What is my mistake ?
I would like to send an email with informations of the table after payment validation.
I tested
and
but DB Read doesn't run at all.
Excuse for my English.
Sten
I would like to send an email with informations of the table after payment validation.
I tested
<?php echo $form->data["nom"]; ?>
and
<?php echo $form->data["nom"]; ?>
but DB Read doesn't run at all.
Excuse for my English.
Sten
Hi Sten,
Please try
Pleas leave the Model ID empty and set Enable Model ID to No unless you are sure that you need it.
Bob
Please try
<?php
return array('id' => $form->data['custom']);
?>
Note: [] and not () round 'custom'
Pleas leave the Model ID empty and set Enable Model ID to No unless you are sure that you need it.
Bob
Thank you Bob !
I just modify your code replacing it by
Now, I can read the database. Great !
However I get a problem again : Paypal IPN try many times to log with my form and I receive 8 emails notifications from my form !
Do you know why ?
I just modify your code replacing it by
<?php
return array(id => $form->data['custom']);
?>
Now, I can read the database. Great !
However I get a problem again : Paypal IPN try many times to log with my form and I receive 8 emails notifications from my form !
Do you know why ?
I test to disable DB Read and Email et then, in Paypal history IPN, the message is "sent" instead of "retrying".
it looks like DB Read disable IPN event to sent a response to paypal.
Am I wrong ?
it looks like DB Read disable IPN event to sent a response to paypal.
Am I wrong ?
This topic is locked and no more replies can be posted.