【发布时间】:2019-09-22 19:45:18
【问题描述】:
全名 concat 的正确方法是什么 它在表中的三列 resident_fname resident_mi resident_lname
$resident = Resident::whereRAW("Concat(resident_fname,'',resident_mi,'',resident_lname) LIKE '%{$request->input('reservation_name')}%'")
->first();
【问题讨论】:
-
答案只有 fname 和 lname 三列怎么样?包括中间首字母以使其成为全名?
-
可以使用任意多个参数调用 SQL CONCAT 函数。
-
@ginabotlola 你想在这里用 concat 做什么?