-1
SELECT e.emp_id, concat(e.firstname,' ', e.middlename,' ',e.lastname) as EmployeeName ,
(select * from mst_attendance where status='Present' AND a.current_date > '#2008-09-29%#' GROUP BY substr('emp_id',0,5) HAVING COUNT(*)>1 ORDER BY a.emp_id='5') as PresentDays,
a.emp_id, a.current_date, a.status, a.in_time, a.out_time FROM mst_attendance a
INNER JOIN mst_employee e ON a.emp_id=e.emp_id where e.status='active'
and e.flag='Y' and e.role='employee' and e.emp_id='5' ORDER BY a.created asc LIMIT 1
ここで私は従業員の現在の日を知りたいと思います。しかし、私はエラーを取得する:このエラーはどこにありませんか
1241 - Operand should contain 1 column(s)..
のようなものでなければなりませんあなたは、単一の列を選択する必要が – kerv
サブクエリから複数の結果を得るカントあなたが追加したサブクエリの*の代わりに。 – Anandhan