在mysql数据库中搜索内容

i want to make a site with lyrics of songs(lyrics will be stored in mysql databases) .i want to add a search function so that a user can search by typing a few words.is there any script which searches mysql database. if yes then what it is? i am very new to programming.

Here is a good resource to get you started :

http://www.emirplicanic.com/php/php-mysql-search-script.php

How to search a MySQL DB...

Basically you have to create what we call queries and a special language known as SQL (Structured Query Language) is used for this purpose.

Then you've got to create a web page with html that will take your search requirements and run them on a server using a language like PHP. The answer is then returned to the user at the browser.

Now, there are two ways of implementing these queries.

  1. Use the standard search operator known as 'like'.

  2. Use what we call 'full text searches'.

Option 1 has some benefits but if you have a very large database (with millions of songs) it can be slower.

Option 2 has its own advantage of speed.

In short, if you're a starter, you've got a long way to go, learning these things first.

Cheers!