Statement for No Records found

Display a "No Records Found" message in ChronoForms v5.

Overview

The form query returns an empty result set without any user feedback.
Add an Event Switcher after the DB Read action to check if the result array is empty, then trigger a 'fail' event containing an Event Loop action to output the message.

Answered
ja jason.clemens 27 May, 2014
Is there a way to have a statement show like "No Records Found" when the query finds no records?
Gr 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
Max_admin 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
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.