![]() |
i need a quick and dirty way of doing something
I need a quick and dirty way of adding (say) 50 points to a certain user ID each day. So, something really quick and dirty in a PHP script which i could then run as a CRON job would be perfect.
Something like: >> Connects to my MySQL database (i dont mind hardcoding the info) >> Reads the point count of a user id which i will hardcode into the script >> Adds 50 points to that user IDs point count >> Closes connection It doesnt need any sort of frills or ease of use. Im trying to do this atm but im getting stuck because im not really good at MySQL. PLEASE PLEASE PLEASE help! |
I would just open includes/cron/birthday.php due to it is ran once a day and find
Code:
$today = date('m-d', TIMENOW); Code:
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET uttpoints = uttpoints + 50 WHERE userid = 1"); There you have it , fast :) , you can toss it in the mud if ya need it dirty. |
lol thanks man, i will try it now :)
Quote:
Code:
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET uttpoints = uttpoints + 50 WHERE usergroupid = #"); |
Doesn't the latest version have a paycheck feature?
|
Not the current released version, however it is already working on area51.geekydesigns.com and usergroup based.
|
Link14716, i will eagerly await the next release, however for now this little technique will work. I think i might put it into a seperate php file and neaten it up a little and then release it as a small hack if 'hate' doesnt have a problem with it :)
I know lots of people would like this feature but they may not see this thread and just go straight to the hacks area. |
I have no problem with it at all :)
|
Thanks hate :)
|
All times are GMT. The time now is 11:17 AM. |
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:
|