*

katalin2k

  • ***
  • 83 posts
Query to renew all expired listings
« on: February 05, 2025, 09:52:57 PM »
Hi guys,
Can anyone provide a mysql query that renews all expired listings?

Thanks!

*

MB Themes

Re: Query to renew all expired listings
« Reply #1 on: February 07, 2025, 04:39:27 PM »
Start with something like this.

Code: [Select]
SELECT * FROM oc_t_item WHERE dt_expiration >= now();
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Marked as best answer by frosticek on February 08, 2025, 07:58:03 AM
*

katalin2k

  • ***
  • 83 posts
Re: Query to renew all expired listings
« Reply #2 on: February 07, 2025, 08:40:29 PM »
Thanks! I used this query, hopefully it's ok
Code: [Select]
UPDATE oc_t_item SET dt_expiration = DATE_ADD(dt_pub_date, INTERVAL 90 DAY) WHERE b_enabled = 1 AND dt_expiration < NOW();