how can i add two strings in Autocomplete label

时间:2016-12-23 12:00:57

标签: php jquery autocomplete jquery-ui-autocomplete

This is my query of Autocompletion:

$studentsQuery = $conn->query('select s.student_fname,s.student_lname as label,blahhh.....);

from the query i am getting result as student_lname in input field value because i wrote it as a label

My question is how can i add student_fname, student_lname in label..?

Example:
I have a name like Mohammad(student_fname) Waheed(student_lname) current result is "waheed" But i want "Mohammad Waheed".

1 个答案:

答案 0 :(得分:4)

concat()函数用于组合多个字符串:

select concat(s.student_fname, ' ', s.student_lname) as label ...
相关问题