• Hi,

    it there a method to check if [pdb_list] returns no values?
    I use the do_shortcode() method to display a custom search. It works great but I want to display a message like “Sorry, no results!” if the search returns no records. Until now I did a seperate MySQL query to check if there are any results. Is there a direct way to do that?

    cheers
    dan

    • This topic was modified 8 years, 2 months ago by Ghostflasher.
Viewing 1 replies (of 1 total)
  • Plugin Author xnau webdesign

    (@xnau)

    This is typically handled in the template. If you take a look at the default list template, you’ll see that it checks for $record_count > 0 and prints the list if there are records to show. You can see further down the template where it prints the “no records found” message.

    So, your direct way to check for the number of results is that $record_count variable in the template.

    • This reply was modified 8 years, 2 months ago by xnau webdesign. Reason: clarity
Viewing 1 replies (of 1 total)
  • The topic ‘when pdb_list returns no values’ is closed to new replies.