Support the ongoing development of Laravel.io →
Database Eloquent Forms
Last updated 1 year ago.
0

Change DB:select to DB:raw

Last updated 7 years ago.
0

PredatorLeet said:

Change DB:select to DB:raw

tq for your feedback. i try to use DB::raw alone but not working. here solution that wonderful person reply to me from other site ^_^

$kontrak =DB::select( DB::raw("select tugasan_kontrak.*,sejarah.tkh_wujud as tkh_wujud ,sejarah.id_tindakan as id_tindakan from tugasan_kontrak left join sejarah on(tugasan_kontrak.id_tugasan = sejarah.id_tugasan and jenis_tugasan='k' and sejarah.id_tindakan !='99' and id_sejarah = (select max(id_sejarah) from sejarah where tugasan_kontrak.id_tugasan = sejarah.id_tugasan and jenis_tugasan='k')) where pegawai_tugas=:nokp and id_tindakan is not null "),['nokp' => $value]);

Last updated 7 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

redruewei redruewei Joined 9 Mar 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.