So I am trying to accomplish something like this:
SELECT * FROM table WHERE status_id IN (1,3,4);
using Zend_Db_Select... can\'t find how to do
We can use Zend\Db\Sql\Predicate\In
with Zend\Db\Sql\Where
to make a where in query inside a model.
$this->status_ids = array(1,3,4);
// select attributes from db by where in
$result = $this->select(function (Select $select) {
$predicate = new In();
$select->where(
$predicate->setValueSet($this->status_ids)
->setIdentifier('status_id')
);
})->toArray();