мое мнение
Код: Выделить всё
[i][/i] Call Doctor
$(document).ready(function(){
alert("gfdfg");
function getVotes(userRef){
$.ajax({
type: 'get',
url: 'http://localhost/web/view-number',
data: 'userRef=' + userRef,
success: function(data) {
//alert(data);
$('#content').html(data);
}
});
}
});
Код: Выделить всё
function viewNumber($userRef = NULL){
//echo "fdsfd";exit;
$this->load->model('DoctorSearch');
$result = $this->DoctorSearch->getNumber($userRef);
if ($result) {
$data['records'] = $result;
//echo '
'; print_r($data['records']); die('test');
}
$this->load->view('pages/view-number', $data);
}
Код: Выделить всё
public function getNumber($userRef = NULL) {
//print_r($userRef); die('test');
$this->db->select('us.userRef,us.medicalRegNo');
$this->db->from('tab_usersprofile as us');
$this->db->where('us.userRef', '3mrTIaKjHAZ2BC7b');
$query = $this->db->get();
//echo $this->db->last_query(); die('test');
$result = $query->result();
return $result;
}
Подробнее здесь: https://stackoverflow.com/questions/458 ... odeigniter
Мобильная версия