PyraX Posted November 13, 2007 Share Posted November 13, 2007 Hi, I have searched for but have been unable to find a semi advance search script for searching a database. Im after simple things like "keyword" and -keyword etc. Thanks in advance PyraX Link to comment https://forums.phpfreaks.com/topic/77242-database-search/ Share on other sites More sharing options...
Daukan Posted November 14, 2007 Share Posted November 14, 2007 <?php $query = " SELECT * FROM `table' WHERE `name` LIKE '%$findme%'"; ?> That searches the whole field for any part of $findme If you want to find a word starting with $find just use the fist % <?php $query = " SELECT * FROM `table' WHERE `name` LIKE '%$findme'"; ?> I don't how fancy your searches need to be but thats the basic way to do searches, unless you need to search TEXT fields, that uses a different approach Link to comment https://forums.phpfreaks.com/topic/77242-database-search/#findComment-391072 Share on other sites More sharing options...
PyraX Posted November 14, 2007 Author Share Posted November 14, 2007 thanks Daukan I was looking for something a bit more advanced, looks like I will be doing all the custom stuff myself Link to comment https://forums.phpfreaks.com/topic/77242-database-search/#findComment-391103 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.