It looks like you are using a stand alone php script, which means that Drupal shouldn't be bootstrapped and you basically can't use any of Drupal functions, unless you already bootstrap Drupal without showing. If you do bootstrap Drupal, there's not much point in using a stand alone PHP script.
Another thing is that you should put the %
for the like query directly in the sql instead:
WHERE title LIKE '%s%' ... $search
Another thing is that you are doing:
$('#search-results').html(data);
Which should work, but shouldn't be pretty since it's a json encoded string you are inserting. You might considder using $.getJSON
which will convert the data into json format.
You might also consider debugging your php script, or use firebug to see if you get the expected output.
googletorp
2010-10-26 12:27:42