MySQL
  Home arrow MySQL arrow Page 6 - Developing A Site Search Engine With PHP A...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MYSQL

Developing A Site Search Engine With PHP And MySQL
By: Mitchell Harper
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 108
    2002-02-16

    Table of Contents:
  • Developing A Site Search Engine With PHP And MySQL
  • Search Engine Theory
  • Creating the database
  • The searchdocs.php script
  • The doSearch function
  • Testing our search script
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Developing A Site Search Engine With PHP And MySQL - Testing our search script


    (Page 6 of 7 )

    Here's the output from our searchdocs.php script when I entered "mysql" (without quotes) into the text field:

    Search results for the mysql keyword

    Let's add another record to our database and then conduct a search based on multiple keywords. Enter the following code at the MySQL command prompt:

    insert into articles values(0, 'Apache is pronounced A-Patchy', 'Did you know that Apache is pronounced A-Patchy, because back in its early days it consisted of code that was just \'patched\' together roughly to create a web server?');

    We need to tell the search script that the keyword "apache" is related to our new document, so enter the following MySQL command also:

    insert into searchWords values(0, 'apache', 3);

    Now, enter "mysql apache" as the search keywords in the text box and click the search button. You should see three articles returned (note that there are no duplicates returned):

    Searching for the keywords mysql apache

    More MySQL Articles
    More By Mitchell Harper


       · Nice tutorial, but as you said the functionality is limited. Do you think that you...
       · Hi, My name is Sajjad . its Cool Script, i want to download it but unable...
       · You still checking comments ? i tried to do as u did but still somethings missing i...
     

    MYSQL ARTICLES

    - MySQL and BLOBs
    - Two Lessons in ASP and MySQL
    - Lord Of The Strings Part 2
    - Lord Of The Strings Part 1
    - Importing Data into MySQL with Navicat
    - Building a Sustainable Web Site
    - Creating An Online Photo Album with PHP and ...
    - Creating An Online Photo Album with PHP and ...
    - PhpED 3.2 – More Features Than You Can Poke ...
    - Creating An Online Photo Album with PHP and ...
    - Creating An Online Photo Album with PHP and ...
    - Security and Sessions in PHP
    - Setup Your Personal Reminder System Using PHP
    - Create a IP-Country Database Using PERL and ...
    - Developing a Dynamic Document Search in PHP ...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek