tibberous Posted September 23, 2007 Share Posted September 23, 2007 I want the user to put in a search term and search the database for it. What would be the best way to do that? Link to comment https://forums.phpfreaks.com/topic/70318-best-way-to-do-a-search-engine-just-a-database-search-not-a-web-search-engine/ Share on other sites More sharing options...
benjaminbeazy Posted September 23, 2007 Share Posted September 23, 2007 depends on what data users are searching. and a lot of ther things. maybe you could provide more information as to what data, database type, etc. Link to comment https://forums.phpfreaks.com/topic/70318-best-way-to-do-a-search-engine-just-a-database-search-not-a-web-search-engine/#findComment-353250 Share on other sites More sharing options...
tibberous Posted September 23, 2007 Author Share Posted September 23, 2007 Lets say it is just a single field from a database. Should I do something like: $searchterm = mysql_escape_string($searchterm); mysql_result("select * from table where description like='%$searchterm%'"); Link to comment https://forums.phpfreaks.com/topic/70318-best-way-to-do-a-search-engine-just-a-database-search-not-a-web-search-engine/#findComment-353253 Share on other sites More sharing options...
mmarif4u Posted September 23, 2007 Share Posted September 23, 2007 Yes u can. Its upto u which sort of searcing method u wana use. But the query u write is ok. Link to comment https://forums.phpfreaks.com/topic/70318-best-way-to-do-a-search-engine-just-a-database-search-not-a-web-search-engine/#findComment-353255 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.