Im getting a hard time with this guys, How can i call this kind of php class? Here rest my problem remote: 'myData.php?jquery=%jquery' What's the correct call format?
myData.php
public static function getproduct($p){
$sql = "select * from products where code like '%$p%' or name like '%$p%' or id like '%$p%'";
$query = Executor::doit($sql);
return Model::many($query[0],new ProductData());
}
From Js/Ajax like:
$(document).ready(function() {
$('input.city').typeahead({
name: 'city',
remote: 'myData.php?jquery=%jquery'
});
})
Thanks!