UPDATES EasyBlog 6.0.11 Released! Update to the latest version now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is offline
Our team is away during the weekend. Some answers may already be available on our documentation

Rest assured that we will get back to your posts as soon as the week starts!
  Support is offline

Need help to configure SQL Query

RRobert · ·
2:44 PM Tuesday, 04 June 2019
High
Hi, i ned some help to configure sql query, i don't know how to reset values every time plans are renewed.

Description :
I use this app in order to add credits on a table rsdirectory_users in order to sell points that allow my users to edit content on a dedicated menu.

So in these following case it work well :
- when users are suscribing to a dedicated plan (Platine, Full) : it add 50 or 150 points on the table as expected
- when user subscription has expired : it remove credits left as waiting

But the problem is when plans are renewing automatically it does'nt resetting the table and give expected points to my users (50 ,150).
Example :
1. users has 12 points left before plan are to renewing
2. after the renewal has done, it does'nt removing the 12 points and give it 50 points instead of!!!

Here my config :

- When plan (platine) are activated :
insert into #__rsdirectory_users (user_id,credits,unlimited_credits,enable_contact_form) values ([[USER_USER_ID]] , 50 , 0 , 1)

- When plan are expired :

delete from #__rsdirectory_users where user_id = ([[USER_USER_ID]])

But i don't see know how reset the table in case of plans are renewed!
I thought that every time plans are renewing automatically this mean that in the first time it expire, then it's activated again, but it seem not to be the case.

Regards
The replies under this section are restricted to logged in users or users with an active subscription with us