i want to ask about multiple select with between condition.
i have made the code but i have got wrong callback value. in my php function i give two between condition, first between from date_awal and date_akhir and second from kode and kode_mat. but when i'm running the program i got wrong value from the date.
(example : i want select date 21-08-2017 to 22-08-2017)
when i'm running it i got it wrong value. i just got the data from 21-08-2017 only and the data from 22-08-2017 didn't showing, but when i change the date from 21-08-2017 to 22-08-2017
i can get the data. and something make me confuse i can get right value from between condition from kode1 and kode2. maybe someone can solve that. please help me
this is my php call function
<?php
include("../../Connections/koneksi.php");
$date_awal=$_POST['date_start'];
$date_akhir=$_POST['date_end'];
$kode=$_POST['kode_mat'];
$kode_mat=$_POST['kode_mate'];
$sloc=$_POST['s_loc'];
$s_loc=$_POST['s_loc1'];
$type=$_POST['get_type'];
//Display all data
$rows = array();
$sql = "SELECT * FROM wjm WHERE (date BETWEEN '$date_awal' AND '$date_akhir') AND (kode BETWEEN '$kode' AND '$kode_mat') order by kode asc";
$query = mysqli_query($db,$sql);
while($tmp= mysqli_fetch_assoc($query)) {
$rows[] = $tmp;
}
echo json_encode($rows);
</div>