let i have database structure like this.
sr no. name age
1. hemant 25
2. amit 23
3. vikash 24
and i have array like following:
arr=['hemant','amit'];
You can use whereIn statement:
var arr = ['hemant', 'amit'];
knex('table')
.whereIn('name', arr)
.del();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With