Jquery UI not working properly for some words

ⅰ亾dé卋堺 提交于 2019-12-11 04:14:20

问题


<script type="text/javascript">
$(function() {
$( "#customers" ).autocomplete({
    source: 'search.php'
});
});
</script>
<div class="ui-widget"><input id="customers" name="Cno" placeholder="Customer Name"></div>

search.php

<?php include('header.php');
//get search term
$searchTerm = $_GET['term'];
//get matched data from skills table
$query = $db->query("SELECT * FROM customers WHERE Customer_Name LIKE '%".$searchTerm."%' ORDER BY Customer_Name ASC");
while ($row = $query->fetch_assoc()) {
$data[] = $row['Customer_Name'];
}
//return json data
echo json_encode($data);
?>

Please check in first screenshot, Search by Keyword 'gulf' is not showing, But when I search 'gulf r' then it shows data, And I have also attached scrshot of search by keyword 'abd' 3 letters only, Then also it is working properly, But Why is this not working for 'gulf'

来源:https://stackoverflow.com/questions/41319885/jquery-ui-not-working-properly-for-some-words

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!