2017-06-19 7 views
-2

この標準SQLをlaravel 5.3クエリーに入れる方法は?この標準SQLをlaravelクエリーに入れる方法は?

SELECT a.emp_id, d.course_code, d.start_time, d.end_time, 
(SELECT time FROM hris_biometrics_attendance WHERE date = '2017-06-13' AND time BETWEEN d.start_time - 1 AND d.end_time -1 AND emp_id = a.emp_id) AS time_in, 
(SELECT time FROM hris_biometrics_attendance WHERE date = '2017-06-13' AND time BETWEEN d.end_time - 1 AND d.end_time + 1 AND emp_id = a.emp_id) AS time_out FROM hris_ftl_final_courses a, hris_ftl_final_courses_details d 

答えて

0

$ sql =あなたのクエリ。 戻り値DB :: select($ sql);

関連する問題