Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
Respected Sir/Madam, As per your instruction I have used the text box as search option but unable to implement in query. I mean can you provide me an idea of how to pass the text value in to the query. As per I understood I have implement the code below.
<script>
<?php
if(isset($_POST['submit'])){
$startDatePicker=$_POST['startDatePicker'];
$selected_val = $_POST['radioList']; // Storing Selected Value In Variable
$startDatePickernew=date("d-m-Y", strtotime($startDatePicker) );
$textBox=$_POST['textBox'];
?>
//<script>
//alert('ddd');
//</script>
<?php
//echo "You have selected :".$selected_val; // Displaying Selected Value
$countno = 1;
if($selected_val=="CallingDate")
{//echo '1'.$startDatePickernew;
echo
Table::create([
"dataSource"=>$this->src("cloudkli_demo")->query("SELECT ce.custName AS PatientName,ce.custPhoneNumber AS PhoneNumber,ce.custServiceFor AS Treatment,DATE_FORMAT(ce.custCreatedDate, '%d-%m-%Y') AS CreatedDate,DATE_FORMAT(ce.custAppointmentDate, '%d-%m-%Y')As AppointmentDate,
DATE_FORMAT(ce.custStatusDate, '%d-%m-%Y') As CallBackDate,ce.custVistId AS VisitID,ce.custRemarks AS Remarks,
ce.callType AS Typeofcall,cr.replyName AS Reply,cs.statusName AS Status
FROM tblcustomerenquiries ce
LEFT JOIN tblcustomerreply cr ON ce.callType = cr.replyId
LEFT JOIN tblcustomerstatus cs ON ce.custCustomerStatus = cs.statusId
WHERE ce.custVistId IS null AND DATE_FORMAT(ce.custCreatedDate, '%d-%m-%Y')='$startDatePickernew'
or (ce.custName='$textBox' or ce.custPhoneNumber='$textBox')"),
Actually I have small doubt that is when I search any data in the search box it need to be appear directly but in my case I need to enter the data in search bar and then after clicking on the submit button the data is getting retrieved. I hope that my question is clear.
Respected Sir/Madam, The below is the output of the above code which I have implemented for the search.
And when I enter the text in the search and then click on the submit button then the data is appearing correctly. So could you please show me an solution for the search option.
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo