Forums

Statement for No Records found

jason.clemens 27 May, 2014
Is there a way to have a statement show like "No Records Found" when the query finds no records?
GreyHead 27 May, 2014
Hi jason.clemens,

I think that in CFv5 you need to follow the DB Read action with an Event Switcher. Use that to check the size of the result array, if it's empty trigger the 'fail' event and add an Event Loop action there.

Bob
jason.clemens 01 Jun, 2014
I am sorry , I forgot to specify. I meant for CCv5.
Max_admin 02 Jun, 2014
Answer
Hi Jason,

Please try to use this code in the header box:

<?php
if(empty($rows)){
echo "no results found";
}
?>


Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.