vicodin Posted February 23, 2008 Share Posted February 23, 2008 I currently have a site with a mysql db and all my products are in there. So what i was planning to do is search form them by a keyword. The keywords are all stored in one cell and are separated by a |. Is there a way i can get mysql to recognize that the keywords are separated by a | and if it matches the query to output it in an array? If thats not possible should i have it pull every entry explode the keywords if it matches then output it if not go to the next? Really what im looking for is the most efficiant way to search for my products in my db. Any ideas anyone? Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted February 23, 2008 Share Posted February 23, 2008 code please ??? Quote Link to comment Share on other sites More sharing options...
vicodin Posted February 23, 2008 Author Share Posted February 23, 2008 I dont need help with the code, i can code it just fine im just not sure what is the most efficant way to code it. Also wondering if Mysql has something in it like explode and can know that my product keywords are seperated by a |. Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted February 23, 2008 Share Posted February 23, 2008 MYSQL does not have explode however PHP does. <?php $keywords= $_POST['keywords']; //seperate by | explode("|",$keywords);?> 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.