Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Looking for a ready made code for an advanced search
Old 11-11-2005, 05:46 AM Looking for a ready made code for an advanced search
Novice Talker

Posts: 6
Trades: 0
Hello!
I would like to create a search from info that is stored either in a simple table or in a database table, that I can search according to parameters that define the table.
For example: search for apartment:
1. According to location
2. According to number of rooms
3. According to size.

the search can be and/or part or all the parameters.
Thanks!
__________________

Please login or register to view this content. Registration is FREE
;
Please login or register to view this content. Registration is FREE
;
Please login or register to view this content. Registration is FREE

betty smart is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-11-2005, 10:40 AM
ExpressoDan's Avatar
Ultra Talker

Posts: 317
Name: This Space for Rent
Location: Georgia
Trades: 0
If you are using ASP and DW then check out this extension from Tom Muck.
http://www.tom-muck.com/extensions/h...amicsearchasp/
__________________

Please login or register to view this content. Registration is FREE

"I think therefore I am, I think." <!-- George Carlin
ExpressoDan is offline
Reply With Quote
View Public Profile Visit ExpressoDan's homepage!
 
Old 11-11-2005, 11:25 AM
amw_drizz's Avatar
Ultra Talker

Posts: 340
Name: Jon
Location: New York
Trades: 0
you dont need to double post....


Here and the javascript forum..... .???? why/?????
__________________
AMW_Drizz
Dev Machine:: Apache 2.2.6 PHP 5.2.6 MySQL 5.1
amw_drizz is offline
Reply With Quote
View Public Profile Visit amw_drizz's homepage!
 
Old 11-11-2005, 12:18 PM
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
You wouldn't use JavaScript for that, you would use ASP or PHP and a database system like Access or MySQL. What kind of server side scripts can you run on your server? Do you have a database system on the server?

Last edited by funkdaddu; 11-11-2005 at 12:20 PM..
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Old 11-12-2005, 08:57 AM I'm using the Mambo system
Novice Talker

Posts: 6
Trades: 0
Which means I have a mySQL database and script is in PHP.
I think I'll post a question in the PHP forum.
thanks!
__________________

Please login or register to view this content. Registration is FREE
;
Please login or register to view this content. Registration is FREE
;
Please login or register to view this content. Registration is FREE

betty smart is offline
Reply With Quote
View Public Profile
 
Old 11-13-2005, 06:18 PM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
I merged the two threads...
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 11-13-2005, 08:04 PM
Republikin's Avatar
Defies a Status

Posts: 3,189
Trades: 3
No need to post in the PHP forum as you can do this all from within MySQL. There are a few different methods too.

Method 1:
Using like, the advantage here is that you can use wildcards ( % )
Code:
SELECT * FROM Apartments WHERE Location LIKE 'Seattle';
Method 2:
Using a more precise method, this method is great when you have a table with specific location names and you have no need to match via a pattern of some sort.
Code:
SELECT * FROM Apartments WHERE Location = 'Seattle';
Method 3:
Using Regex, this method is not really neccesary for your needs unless you have need to various strings from disparate backgrounds and you have no clue what may be thrown at you next or if you want to match several locations in a more precise manner than the LIKE clause.
Code:
SELECT * FROM Apartments WHERE Location REGEXP '^Sea';
Method 4:
Full Text Searching, this is more preffered for natural language query type of search engine (like Google). This method also has some scoring options to filter better results from less likely ones however I will just give you the base example for now.
Code:
SELECT *, MATCH('Location') AGAINST('Seattle') FROM Apartments;
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Republikin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Looking for a ready made code for an advanced search
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.55861 seconds with 12 queries