Jump to content

using php to calculate difference.


renfley

Recommended Posts

Hey guys im stuck in a bind and need some input.

 

What im trying to do is display a number based from community levels.

ex:    This user need another 2 tasks to get next level.

 

here are the levels

 

1- 0-2 task    new

2- 2-5 tasks    beginer

3- 5-7 tasks    pro

4- 7+ tasks    advanced

 

The way it works is by two different tasks. basicly i wanna know which is the higher number in the tasks either how many posts or comment and figure out based on our levels how many tasks he need to complete in order for him to reach the next level.

 

the first query sees how many post this user has

the second check how many comment he has

 

I wanna take the highest number and that belongs to whicheber catgory, do a calculation. and have this kind of output

 

This user is level 2 and need 1 more task to reach the next level.

 

Like i know if he need one more that he has 4 tasks done.

 

I know im all over the place with this one im just trying to get someone who might have an idea of my issue and point me in the right direction. Either if this is a known ?? does this procedure has a specific name anything will help me.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.