Guest User

Get FRM Items Using Created By

a guest
Dec 26th, 2023
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | Source Code | 0 0
  1. global $wpdb;
  2.  
  3. $date = [something];
  4. $sql = "SELECT id from {$wpdb->prefix}frm_items WHERE created_at <= '$date'";
  5. $ids = $wpdb->get_col ( $sql );
  6.  
  7. foreach ( $ids as $id ) {
  8. FrmEntry::destroy($id);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment