php - laravel 5 How can I query -


php made ​​my query in laravel can not.

this pdo code.

$query2 = $db->query("select * veriler masraf_kodu='$hesap_kodu' , tarih between '$tarih1' , '$tarih2'", pdo::fetch_assoc); 

how can laravel 5 controller query ?

masraf_kodu data table, hesap kodu plans database

if you're using query builder, try wherebetween():

$data = db::table('veriler')              ->where('masraf_kodu', $hesap_kodu)              ->wherebetween('tarih', [$tarih1, $tarih2])              ->get(); 

Comments

Popular posts from this blog

javascript - How do you prevent nested queries/catches in sequelize? -

java - Could not retrieve pre-bound Hibernate session - Could not obtain transaction-synchronized Session for current thread -

java - ConcurrentModificationException upon committing transaction with Hibernate -