Jump to content

Automatically determine turn and proceed accordingly


Greaser9780

Recommended Posts

I am wondering how to go about this in PHP. I need to write a script that constantly detects which teams turn it is. Then if they have preselected players for their team it will update the db the second it becomes their turn. Everytime a teams selection is made it has to check for this and either update or exit. The problem is, if it updates, it automatically needs to run again because it was just updated. Not lookin fo rcode here just suggestion on how to make it happen. I thought of a CRON job but that will not be automatic as I can only run a CRON every minute.  This is how I determine turn as of now. In the teams table I have a row labelled activate every time this team picks a player activate is incremented. So I run a query to return a list of teams ordered by activate ASC then by teamid ASC.

 

 

I am not sure if this is even possible with only PHP.

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.