• mouschi

    (@mouschi)


    Easy to use so far! The only issue I have is I want to use this for a serial number lookup. Let’s say the serial numbers I put in are A12345 A12346 A12347 and so on. I don’t want ALL of them to come up if someone inputs A123. I want only one result to come up, and only if someone puts in the entire serial number I assign. How can this be done?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter mouschi

    (@mouschi)

    I’d definitely appreciate a response here, please.

    Thread Starter mouschi

    (@mouschi)

    I guess the support is dead here :/

    Thread Starter mouschi

    (@mouschi)

    @epwcsysh thank you for the response! I don’t think that is what I was looking for, however, I Have modified the code myself to get the desired results. Here is how to do it, in case someone stumbles on this plugin, loves it, but is disappointed that support is dead.

    The situation is this: I have a database lookup system. I want people to be able to pull up exactly one result, based upon the serial number they pull up. I wanted ONLY ONE result each time someone searches something, so here goes:

    Open up sds-main.php and on line 1441, change

    $results_sql = “SELECT id,field_id,field_input FROM ” . $table . ” WHERE field_input COLLATE UTF8_GENERAL_CI LIKE ‘” . $_POST[‘sds-search-data’] . “%’ ORDER BY id ASC”;

    to

    $results_sql = “SELECT id,field_id,field_input FROM ” . $table . ” WHERE field_input COLLATE UTF8_GENERAL_CI LIKE ‘” . $_POST[‘sds-search-data’] . “%’ ORDER BY id ASC limit 1”;

    That limits it just fine for me, and the desired results are achieved. I hope this helps someone here.

    Thread Starter mouschi

    (@mouschi)

    @epwcsysh I checked out the link you posted, and it looks like that solution works as well … and is probably better suited for what I need ?? My solution above may work best for folks who have several fields, but just to re-iterate what is needed: If you want to only have an exact match show up, simply crack open sds-main.php, and remove the % sign from lines 1441 and 1527.

    Thanks Mouschi! Your post helped me!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to only have search results show up that exactly match?’ is closed to new replies.