User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 397,790 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,439 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1517 | Replies: 3
Reply
Join Date: Jan 2005
Location: Sheffield, UK
Posts: 294
Reputation: zippee is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 6
zippee's Avatar
zippee zippee is offline Offline
Posting Whiz in Training

Full-text search on two tables

  #1  
Sep 26th, 2006
Hi, I managed to use the full-text search on a single table (product) and would like to search two tables (product and article) simultaneously, when user enter a keyword. Can anyone help?

Thanks
Ecommerce-Web-Store.com Building Your e-Business.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,881
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 32
Solved Threads: 108
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Full-text search on two tables

  #2  
Sep 26th, 2006
Have been wondering the same. I believe you can only do a full text search on selected fields within a single table. In the past when I was in dire need of this feature and didn't have time to experiment, I did a brute force method where I ran a full text search on one table, a second full text search on a second table, and then merged the resultsets.

Of course, you can do a full text search on the article table and left join in the product table (without searching it).
Reply With Quote  
Join Date: Jan 2005
Location: Sheffield, UK
Posts: 294
Reputation: zippee is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 6
zippee's Avatar
zippee zippee is offline Offline
Posting Whiz in Training

Re: Full-text search on two tables

  #3  
Sep 26th, 2006
em... interesting. I was thinking of storing results from both tables (separate full-text search as you mentioned) in array, then sort them based on their scores, and display them. Not sure this may cause a long delay... any thought?
Ecommerce-Web-Store.com Building Your e-Business.
Reply With Quote  
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,881
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 32
Solved Threads: 108
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Full-text search on two tables

  #4  
Sep 26th, 2006
Yes, that's what I've done in the past. It did put a heavy load on the server.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 5:33 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC