это мой скрипт
Код: Выделить всё
$('#namapenerima').autocomplete({
source : "",
select : function(event, ui) {
$('[name="namapenerima"]').val(ui.item.labelnama);
}
});
Вот мое мнение
Код: Выделить всё
Nama
Код: Выделить всё
public function DataPPAT()
{
$nm = $_GET['term'];
if (isset($nm)) {
$result = $this->BrowseAkun_m->DataPPAT_m($nm);
if (count($result) > 0) {
foreach ($result as $row)
$arr_result[] = array(
'labelnama' => $row->nama,
);
echo json_encode($arr_result);
}
}
}
Код: Выделить всё
function DataPPAT_m($nm)
{
$this->db->like('nama',$nm,'both');
$this->db->order_by('nama', 'ASC');
$this->db->limit(10);
return $this->db->get('ppat')->result();
}
Подробнее здесь: https://stackoverflow.com/questions/693 ... iter-mysql
Мобильная версия