Jump to content

[SOLVED] Multiple Query Problem


Goose87

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.