Forums
This topic is locked
Need to show message when no data found!
Posted 09 Oct 2002 14:50:17
1
has voted
09 Oct 2002 14:50:17 Alex Kanakaris posted:
I am using queries through PHP to mysql and all is fine except from tis. When there is a search and there are no results I get a blank page. How do I fix that to give some kind of message? Like "NO DATA FOUND".
Thank you!
Replies
Replied 09 Oct 2002 15:41:07
09 Oct 2002 15:41:07 Brent Colflesh replied:
Dear Lexios,
If you have Phakt installed, this can be accomplished with the "Show Region if Recordset is Empty" Server Behavior.
Otherwise, bracket your "No data found" message with an IF statement like:
<?php if ($rsYourRS->RecordCount()==0) { ?>
No data found.
<?php } // end $rsYourRS->RecordCount()==0 ?>
Regards,
Brent
If you have Phakt installed, this can be accomplished with the "Show Region if Recordset is Empty" Server Behavior.
Otherwise, bracket your "No data found" message with an IF statement like:
<?php if ($rsYourRS->RecordCount()==0) { ?>
No data found.
<?php } // end $rsYourRS->RecordCount()==0 ?>
Regards,
Brent
Replied 09 Oct 2002 23:05:48
09 Oct 2002 23:05:48 Alex Kanakaris replied:
Thank you very much! Your help was best!