Welcome to GraphicForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Simple MySql Search; No Results Found Result

 
   Graphic Forums (Home) -> SQL Integration RSS
Next:  What's the Difference Between Joomla & MySQL  
Author Message
BillyWBA

External


Since: Aug 17, 2008
Posts: 3



(Msg. 1) Posted: Mon Aug 18, 2008 4:22 pm
Post subject: Simple MySql Search; No Results Found Result
Archived from groups: macromedia>dreamweaver (more info?)

Hi all,

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!!!!

 >> Stay informed about: Simple MySql Search; No Results Found Result 
Back to top
Login to vote
Joe Makowiec

External


Since: Apr 06, 2006
Posts: 102



(Msg. 2) Posted: Mon Aug 18, 2008 5:01 pm
Post subject: Re: Simple MySql Search; No Results Found Result [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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

 >> Stay informed about: Simple MySql Search; No Results Found Result 
Back to top
Login to vote
Ronnie MacGregor

External


Since: Jun 22, 2008
Posts: 16



(Msg. 3) Posted: Mon Aug 18, 2008 5:34 pm
Post subject: Re: Simple MySql Search; No Results Found Result [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 18 Aug 2008 16:22:30 +0000 (UTC)
BillyWBA said :

> I can't seem to figure out how to have Dreamweaver echo
> back "No Results Found"

You can establish the number of records returned with :

$RecordSetCount = mysql_num_rows($RecordSet);

and then do a conditional echo based on this result.

--
Ronnie MacGregor
Scotland

Ronnie at
dBASEdeveloper
dot co dot uk

www.dBASEdeveloper.co.uk
 >> Stay informed about: Simple MySql Search; No Results Found Result 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
MySQL SERVER NOT FOUND ERROR 404 - Having talked to as many people as should know, NOBODY seems to have a clear answer to the fact that from Dreamweaver 8 there is a serious connectivity issue to MySQL databases in PHP server. I'm using Easy PHP. I begin to wonder if the makers of..

SQL Simple Search Box? - Hi theres. ive created a simple database with a few records in it. All i want to do is create a simple search box where users can type in anything and it searchs and pulls out all records containing the data they typed no matter which field it is in....

Multiple Parameter search...PHP/MySQL - I have a series of dropdowns and a tectfield connected with "and." The problem I have is the default value is easy to set for the drop downs, but the text field you have to set the init val to "%." This is unacceptable. There has to...

PHP/MySQL search record - Hi, I have a form where a user will enter their desired user name and their e-mail address. Once I see that both fields are filled in, I need to check to see if the username and/or e-mail address they entered are already in the database. The table i...

> Search one field in mysql databases for a phrase - i have a table with username and list as fields the list field contains a string that contains a lists of items, each one on a seperate line. is there any easier way to search the whole databases for a phrase conatined within the list field and have...
   Graphic Forums (Home) -> SQL Integration All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]