Hello, as a beginner i am looking for different applications to study, i need a very basic search engine(?) code basically what i want to see is:
1. A PHP code that creates a database with a bunch of name lets say names are:
Martin Mystere
Zagor
Conan the Barbarian
Frank Frazetta
Dylan Dog
2. And the PHP code to search created database and if possible lets say i wrote "Myst" it would show up "Martin Mystere". I don't think this is such a complicated code but as i said at the beginning i am a beginner. So any help is appreciated, thanks.
Very Basic Search Engine
Moderator: General Moderators
-
SimonMayer
- Forum Commoner
- Posts: 32
- Joined: Wed Sep 09, 2009 6:40 pm
Re: Very Basic Search Engine
I would recommend using MySQL to store the data, then run a search using the MySQL "LIKE" function.
You can read more about it at http://dev.mysql.com/doc/refman/5.0/en/ ... tions.html
If you are not familiar with MySQL, try the tutorial at Tizag: http://www.tizag.com/mysqlTutorial/
Please reply if you have further questions about using this.
You can read more about it at http://dev.mysql.com/doc/refman/5.0/en/ ... tions.html
If you are not familiar with MySQL, try the tutorial at Tizag: http://www.tizag.com/mysqlTutorial/
Please reply if you have further questions about using this.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Very Basic Search Engine
Yes, use the SQL operator "LIKE". You can do queries such as "SELECT * FROM people WHERE name LIKE '%Myst%';" and it will find all matching records. See the PDO section of the PHP manual about accessing the database.rozkan wrote:So any help is appreciated, thanks.
(#10850)