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:

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):

Next: Conclusion >>
More MySQL Articles
More By Mitchell Harper