Zend tableGateway Model Delete Query with Multiple IDs

232 Views Asked by At

I want to delete multiple rows by TableGateway like below SQL

Delete from table where id in (1,2,5,6)  - CSV of multiple ids.
1

There are 1 best solutions below

0
Alain Pomirol On

See documentation at https://docs.zendframework.com/zend-db/table-gateway/ Build a Where object to pass as parameter :

$where = new Where();
$where->in('id', [1,2,5,6]);