امتیازها
113
راهحلها
27
- محل سکونت
- England
- نوشتهها
- 26,276
- تاریخ ثبتنام
- ۱۳۹۹٫۰۴٫۰۶
- پسندها
- 3,286
- سن
- 29
- وب سایت
- xenforo.xyz
- نسخه PHP
- 7.3
- نسخه زنفورو
- xenforo 2.2
How do I delete rows from a database using entity framework with a condition?
For example, I could use the following query today:
Code:
But I was trying to use the finder to scope the rows and delete, but doesn't seem like delete is an option?
Code:
Thank you!
For example, I could use the following query today:
Code:
$db->query('DELETE FROM mytable WHERE timestamp > ?', [$timestamp]);But I was trying to use the finder to scope the rows and delete, but doesn't seem like delete is an option?
Code:
\XF::finder('myaddon:myentity')->where('timestamp', '>', $timestamp)->delete();Thank you!
