View Full Version : 2 Things
Number one.. how can i make numbers riound offf..... is floor got somehting to do withit??
and is there a way to make things happen at a certain time evryday
Xenon
07-11-2002, 07:27 AM
1) use the round() function
2) you have to use cronjobs as i know
ok thanks.... ill look up round()
Admin
07-11-2002, 07:32 AM
With round(), 2.4 becomes 2 and 2.6 becomes 3. If you want 2.4 to become 3, use ceil(). If you want 2.6 to become 2 use floor().
round() works fine thanks... any help on the second one?
for example.. say i wanted to put a max post per day.. id add another field... and every time u post it would add to the field as well.. when that got to max u cant post anymore... but the field gets reset to 0 evry midnight
i know there is probably a hack for this but
this isnt exactly wat i want.. its just an example
(the bit of code that says
if time = midnight update userfield set field=0 where userid!=0
Admin
07-11-2002, 07:42 AM
Use a cron job or wait for vB3.
i mena.. wat do i put in the command part, and how do i call it up?
Xenon
07-11-2002, 08:04 AM
thanks chen, but everything is possible with the round()-function too round(x-0.5)=floor(x) isn't it ;)
yo.. i see that cron jobs run off cfg fileS?? can they also run off php... ima try it anyway
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.