In datatable editor IN where clause how to give multiple values?

In datatable editor IN where clause how to give multiple values?

aruncraftsionaruncraftsion Posts: 3Questions: 3Answers: 0

eg:
i need to give three pincode in where condition
->where( function ( $q )use ($pincode) {
$q->where( 'pincode',600011,600021,600024,'=');

} )

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @aruncraftsion ,

    You should be able to or_where there, see page here.

    So something like:

    ->where( function ( $q ) {
      $q
        ->where( 'pincode', 600011,'=')
        ->or_where( 'pincode', 600021,'=')
        ->or_where( 'pincode', 600024,'=');
    } )
    
    

    Cheers,

    Colin

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Duplicate of this thread.

This discussion has been closed.