• Resolved targhan

    (@targhan)


    Hello,

    Ghazale, Your plugin is great. I have only one address table and I have a little problem.

    The data in the database:
    – wp_ghazale_sds_name_form_imputs
    – column – field_input

    Example dates in column – filed_input

    street_name 2/1
    street_name 2/2
    street_name 2/10
    street_name 2/11

    FRONT END SEARCH

    PROBLEM – When I typing input filed – street_name 2/1 – as a result of the search is

    street_name 2/1
    street_name 2/10
    street_name 2/11

    and I want to get only street_name 2/1

    I tried to modify the custom-searchable-data-entry-system/sds-main.php – function ghazale_sds_front_end_search_field($atts)

    but I still can not get the desired result.
    Please advice what am I doing wrong.

    Thx a lot.

    https://www.ads-software.com/plugins/custom-searchable-data-entry-system/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ghazale

    (@ghazale)

    Hi @targhan,

    You can simply make the search engine to return the “exact match” only. This is easily achievable. Just follow below instructions:

    1. Go to your plugins list on your admin dashboard find the Custom Searchable Data Entry System plugin and click on the “Edit” link.
    2. On the page that opens, make sure you’re viewing custom-searchable-data-entry-system/sds-main.php (active)
    3. Find the place where it looks like below (there are 2 occasions: line 1441 and line 1527 – do the following changes on both occasions)
    4. $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";
    5. Remove the percentage sign after $_POST. So it should look like below
    6. $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";
    7. Don’t forget that you should do this on 2 places: on line 1439 and on line 1525
    8. Click on “Update File” and you’re done.
    9. You may need to reactivate the plugin after updating the file.

    That’s it!

    If there’s anything else that I can help you with, you’re always welcome to get in touch:)

    Cheers;

    Thread Starter targhan

    (@targhan)

    Hi @ Ghazale Shirazi,

    Many, many. many thx. Now it works great. I previously changed only line 1441. Probably it could be the cause of that I do not work.
    Again, many, many thx.

    Best Regards,
    TargHan

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Result of the search’ is closed to new replies.