inka Posted July 22, 2010 Share Posted July 22, 2010 Greetings! I`m very newbie to php programing, so please do not laugh if I ask stupid questions. I`m trying currently to make a book catalog and I don`t really know how to realise some searches. First of all, is it possible to search with php in MySQL wih wildcards like *? My other problem would be that I need to introduce a sequence of numbers to a book, the numbers are continuous so I dont want to introduce them all only the first and last number. Is it possible to store in the DB all the numbers between and make the searchable? Example: numbers are 1100-1150, but I need this result also for 1122. Last question would be about keywords, if anyone has some tips how the introduce them to be easily searchable. Thank you very much for you answer! Regards, Inka Quote Link to comment https://forums.phpfreaks.com/topic/208515-searching-number-sequences-and-keywords/ Share on other sites More sharing options...
fenway Posted July 25, 2010 Share Posted July 25, 2010 Yeah, you can use * with LIKE, but it's slow. Yes, if you store min/max, you can use BETWEEN. As for keywords, there are different options -- if it's not crazy large a simple EAV table will suffice. Quote Link to comment https://forums.phpfreaks.com/topic/208515-searching-number-sequences-and-keywords/#findComment-1090926 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.