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 Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.