![]() |
## Little PHP Assistance ##
Ok well i have this when a special link is clicked it runs a php file that has this
PHP Code:
all i need is somthing that will temp promote any user with vote_status=1 to a special user group, and it checks this every 12 hours to. |
In the php file that is clicked on add:
PHP Code:
PHP Code:
|
how can i make it for just registered members as the default group.
|
PHP Code:
|
Chris your code make my vote_status not needed.
PHP Code:
|
Change:
PHP Code:
PHP Code:
|
Thanks that did the trick.
|
Ok i need help on another thing:
ok i can pull the total amount of members like this PHP Code:
|
You would need a seperate query for that.
|
Quote:
|
[sql]SELECT username FROM user ORDER BY posts DESC LIMIT 1;[/sql]
|
never mind did it ^^
PHP Code:
PHP Code:
anyone? |
You will have to limit to the rows with a dateline later then the current time minus cookie timeout.
|
Quote:
|
To put it more simple. Rows are added to the session table all the time. The table gets cleaned again once an hour (i think by default) by a scheduled task.
A user is 'online' however if his last action (page load) was less the the cookie timeout ago. So if the cookie timeout is set to 900 (seconds, 15 minutes, default), then you only want to rows from the session table of the last 900 seconds. |
yea but the time it shows in the table is a huge number like 8 digits
How would i make it just count the rows with userid > 0 |
PHP Code:
|
All times are GMT. The time now is 03:54 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|