UNIX SQL Query

punisher1

Member
Hey guys in a separate PHP file (that means it's not gonna be addon) I want to run a SQL query.

The query must get these values from xf_thread table but it should be only 1 month. For example I think this post_date value is UNIX so I need to get only 1 month older statistics. For example today is 17th day of November and I need the results between October 17 ~ November 17. I just want to print username for each record nothing much so that way I can see who opened more thread in 1 month.

All I need is that sql query to help me do the thing I want.

1605624436385.webp
 
select DATE_ADD(FROM_UNIXTIME(post_date), INTERVAL -30 DAY) FROM table;

30 days can be replaced with -1 MONTH as well, but i would think you'd want to keep it to days in most cases? your call
 
Top Bottom