Mysql Between Condition

Mysql Between Condition

INTONEINTONE Posts: 153Questions: 58Answers: 6

Is it possible to accomplish something similar to this in an editor server fields instance after fields are declared and joined:

  WHERE contact_id BETWEEN 100 AND 200;

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin

    Yes - the documentation here discusses how complex queries such as this can be used.

    Allan

  • INTONEINTONE Posts: 153Questions: 58Answers: 6

    Wow this is new stuff. I did not know all this cool stuff existed, including file upload. Thank you.

  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin

    Yup - added that documentation for the 1.4.1 release. Nice to have it down formally!

    Allan

  • INTONEINTONE Posts: 153Questions: 58Answers: 6
    edited April 2015

    so I am playing around and tried:

           $data
              ->where( 'application_submitted_date', ":date_end",'<=' )
              ->bind( ':date_end', $_POST['report_submitted_date_end'] );
    

    but i am getting a Call to undefined method DataTables\Editor::bind(), even after updating my php server files.

    is there a way to get bind to work when working in a simple queries?

  • allanallan Posts: 63,180Questions: 1Answers: 10,411 Site admin
    Answer ✓

    What is $data - is that the Query instance in the closure callback? From the error I assume not. bind is a Query method so you need to use the closure code style discussed in the documentation.

    Allan

This discussion has been closed.