php - Need help for Mysql selected query -
i have field on database, name time_message , , set default date w, d-m-y h:i:s , , wanna create search using between , value show "d-m-y" how can show query?? i bring code below.. $date1 = "21-08-2015"; $date2 = "d-m-y"; $query = mysql_fetch_array(mysql_query("select count(*) jumlahdata message_complaint (status_message='".$data['status_message']."') , (time_message between $date1 , $date2)")); you conflicting mysql , mysqli . use mysqli $date1 = "21-08-2015"; $date2 = "d-m-y"; $message = $data['status_message']; $query = mysqli_query($con, "select count(*) jumlahdata message_complaint (status_message='$message') , (time_message between '$date1' , '$date2')"); $row = mysqli_fetch_array($query, mysqli_assoc); $con equal mysqli connection