On 18 Aug 2008 in macromedia.dreamweaver, BillyWBA wrote:
> Quick question. I've set up a search page in Dreamweaver, which
> searches my Mysql database for whatever the given entry is. It's a
> basic setup, the search page is on search.php, the results page on
> results.php, and it seems to work pretty well. However, I can't
> seem to figure out how to have Dreamweaver echo back "No Results
> Found" if nothing is found for the search. Right now, if I search
> for anything, and there are no results, the table in the results
> page just shows up empty. I know there has to be a way to have it
> come back with "No Results Found" as opposed to just being blank,
> but I personally am drawing a blank. Any advice? Thank you!!!!
Look in server behaviors for 'Display region if...' behaviors. Put
into the page:
Sorry, no results
Your search results are:
[repeat region goes here]
Highlight the first paragraph (or whatever structure), and apply the
'Display if recordset is empty' behavior. Highlight the second
(results) paragraph/whatever and apply the 'Display if recordset is not
empty' behavior.
--
Joe Makowiec
http://makowiec.net/
Email:
http://makowiec.net/contact.php