Jump to content

Recommended Posts

Hey guys,

 

I have a cron job running on my site, and I have a problem with people entering the database and adjusting the value half way through the cron job.

 

Okay, the problem in detail:  I have a field in the database, lets say the value is 8.  The cron job starts, the user clicks and changes the value back to 0 at the exact time that the cron job occurs.  The value goes to 0 and the user gains a value in another field.  The cron job then adds one to the first field resulting in it going to 9.  The user has gained the exp for the 8, but still has 9 after the cron job has finished.

 

Does anyone know what to type or how to stop the database accepting queries whilst the cron job is working?

 

Goose.

Link to comment
https://forums.phpfreaks.com/topic/112264-solved-multiple-query-problem/
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.