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".
答案 0 :(得分:4)
concat()函数用于组合多个字符串:
select concat(s.student_fname, ' ', s.student_lname) as label ...