Hello, I'm in the middle of writing a search engine for a site and this plugin is bothering me, maybe I'm missing something obvious. It seems to be ignoring my PHP generated queries and it's deciding to run its own query no matter what. I have it setup to return a json result which ends up being an array of items which I got from a database. I wrote a function to process the search query and it works fine when it dumps the result to the actual page but this plugin keeps returning results that match exactly which means the autocomplete contents do not match the results the page shows which is unacceptable. Is there a way to tell the plugin to just ignore its own retarded functionality and use my PHP generated query as the final query? It's weird because for debugging purposes I dumped the query that my PHP page uses to fetch the autocomplete results and it's reporting the query I generated in PHP yet the results do not match. Surely there has to be a way to let it run the queries I want to run because down the line I would like to add many features to the search (like supporting quotes, minus signs, typo correction and all that jazz) and I feel this plugin might just ignore them too. Also there is another funky issue where in Opera 10 (possibly earlier Opera versions), it's completely disallowing quotation marks from being entered in the text box that's attached to the autocomplete. Quotes work fine in every other browser I tested, anyone know why? I would really like to continue using this plugin because other than this issue it's actually pretty good. If this issue is unfixable, I'll be open to suggestions for another solution.
No one has used this script with full success? In case my post wasn't clear: PHP generated query (example for the results page): "SELECT foo_details FROM bar WHERE foo LIKE '%test%' AND foo LIKE '%search%'"; This would return all rows that contain the word "test" AND "search". PHP generated query in the process ajax page is using the same exact query (same exact search function code too), and before it outputs the json result it's saying it's executing that query except the results in the autocomplete drop down box show it is as if the query were: "SELECT foo_details FROM bar WHERE foo LIKE '%test search%'";
AntelopeSalad-- The trick that I use for these sort of situations is the MySQL command REGEXP. It's funny that it's not taught more often. In a nutshell, it allows you to immediately setup Google style searches without the need to write crazy REGEX functionality that you spaghetti into your query. For example: SELECT * FROM table REGEXP $searchterm Code (markup): As for the Bassistance script, it's moody....but once you get the hang of it, it becomes very, very powerful. Concentrate on making your search.php look exactly like this one: http://jquery.bassistance.de/autocomplete/demo/search.phps 9 times out of 10, when I can't get it to work, it is based on something that I had just a little out of whack in that code. And, as a sidenote, I wasn't very successful getting a JSON source to work with the autocomplete, nor was I successful with getting a php script from inside my page with autocomplete to populate the data field. But when I went with the external search page, works nearly every time. Good luck, I'd be happy to help troubleshoot if you're still stuck. Ben Peterson highaltitudedesign.com/