473,803 Members | 3,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

designing a search page for database

I am new to PHP and mySQL, and I am trying to build a database of
services (on a service table) provided by agencies (another table),
where one agency can provide many services, but a service belongs to a
single agency. There are about 10 fields in the services table,
including a comments field which needs to be searchable. I don't know
how to design a search page that will be easy to use for so many
fields, and I don't want to actually enter the data until I am sure
that my database design will support the searches that I need to do.
People should be able to search by agency and also by the fields in
the services table, but I need to get results that include the partial
matches to the search fields, for example where some but not all of
the fields match the serach terms. Plus I'd like to have searches
with "and" and "or". I don't know how to design the search page that
I need for this. Any suggestions would be welcome!

A further complication is that the database needs to be usable by
people with limited education/intellectual level and those with
cognitive impairments, so I need an easy-to-understand method of
searching (possibly with a more complicated "advanced search" optons
as well).

Are there books on designing search interfaces/algorithms that you can
recommend? I'm more confused about the design than about the actual
code, which I think I can figure out once I design the page...

Please send me a copy of replies via email to me**@columbia.e du as I
don't always read the group. Thanks!

Millie
Jul 17 '05 #1
5 2116
I noticed that Message-ID:
<3f************ **************@ posting.google. com> from Millie Niss
contained the following:
Please send me a copy of replies via email to me**@columbia.e du as I
don't always read the group. Thanks!


The nerve of some people!
--
Geoff Berrow
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #2
This class is not the best for doing keyword searches on values. The
person who wrote it is not using SQL to its fullest capability in
limiting the result set to only include relevant matches using a WHERE
clause. Depending on the type of search (wide or narrow) the
following constructs can be used on a varchar datatype:

select name from table where name like '%key1%key2%'

will return all records containing the string in key1 and key2. This
is commonly referred to a narrow search since it really means "find
names where key1 AND key2 are in the name". The next construct is

select name from table where name like '%key1%' or name like '%key2%'

This commonly referred to as a wide search since a name containing
both or only one of the key strings is returned.
renster <renster> wrote in message news:<Xn******* **************@ 203.59.27.131>. ..
sounds like you need

http://aspn.activestate.com/ASPN/Coo.../Recipe/125901

Jul 17 '05 #4
> This class is not the best for doing keyword searches on values.

do you have an alternative class that you can point me to?
Jul 17 '05 #5
> This class is not the best for doing keyword searches on values. The
person who wrote it is not using SQL to its fullest capability in
limiting the result set to only include relevant matches using a WHERE
clause.


Now that I've looked at the class a little more closely I don't see a where
clause anywhere in the class. I'm not an expert or anything, maybe I have
missed it.

I see that he has put th keywords into an array and does a select statement
for the columns specified returning an array. Then the array of keywords is
shuffled through with the result array to determine matches. Wouldn't this
in effect return a wide search as each element of the array is returned?
Not as efficient as it could be with respect to returning all rows that
match the specified columns (without the search terms). I agree with not
making the best use of SQL.
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2189
by: WindAndWaves | last post by:
Hi Gurus I am keen to make a search page on a website, but I have absolutely zero experience with PHP. I am going to hire an expert, but I thought that it may pay to try it a bit first myself (I do want to learn how to do it). What I have is a search page (HTML) and an access database. Now, can someone give me some clues or links on where to start. I prefer not to install the whole PHP thing on my own computer, but just to
3
1656
by: eric rudolph | last post by:
1. I'm designing a PHP-based page that has a lot of design stuff in it. It's very tough to mix the HTML and PHP and have it be readable. The site isn't overall so complicated, there's just a lot of graphics. Is there some commercial way to design the page in a design program, then to use the designed page as a skeleton, or "template" or "fill in" page as a pre-cursor for a real HTML page? For instance, I could replace the designed graphic...
83
5972
by: D. Dante Lorenso | last post by:
Trying to use the 'search' in the docs section of PostgreSQL.org is extremely SLOW. Considering this is a website for a database and databases are supposed to be good for indexing content, I'd expect a much faster performance. I submitted my search over two minutes ago. I just finished this email to the list. The results have still not come back. I only searched for: SECURITY INVOKER
1
1285
by: slonocode | last post by:
I'm wondering if there are certain processes that I could follow to learn to design better classes? Where could I find these processes? Is designing classes more of an art that comes from experience or can it at least be somewhat done by a process? I have the most trouble with abstracting the specifics, such that a class could be reused or just be generic such that anyone could use them.
7
2054
by: dad | last post by:
REQ: any utilities for designing front-ends for databases
2
2629
by: Arsalan Ahmad | last post by:
Hi, May be I am a newbie, or may be i dont have that much insight in following systems ..i.e. why i have some confusions as below: In many websites, when search is performed on some keywords (not only including google which perform general search but other sites which perform seach on a particular type of item in their database) then many search results are obtained (for example more than 100 or even more than 1000) but only limited...
32
1962
by: keri | last post by:
Hi everyone, Having learnt a little about the basics whilst creating my first db I am now about to start creating a good one! I am about to sit down with a large piece of paper and plan it all properly but I have some questions about logistics I wondered if anyone could help with. 1. Can I put command buttons on a table or query?
1
2707
by: hottoku | last post by:
Hi All, I'm having quite a bit of trouble designing a search tool to work with my database. I have found lots of examples from Microsoft Templates to Allen Browne's sample search form. The latter looks very promising, but I need to incorporate a combo box with "Nurse Care Managers" and have it filter by this. (Right now, I'm being asked to enter a parameter value and I can't figure out how to fix this.) I need to be able to search...
1
7554
Merlin1857
by: Merlin1857 | last post by:
How to search multiple fields using ASP A major issue for me when I first started writing in VB Script was constructing the ability to search a table using multiple field input from a form and having the sql statement dynamically built according to the input provided by the user. I have used the method described here hundreds of times it is quick and adaptive. I generally use a frames page for the search, in this way the search is maintained...
0
9703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.