Saturday 15 February 2014

Best practice: storing sql statements in mysql database? -


In most of the free online games now there is not always the action, for example to be completed for 3 Hours like needing hours to complete any specific process. . I have managed to create a table with an Endofprocess field and with the first meeting with the server processes that have met or passed it by executing it

The question is: When the process is complete When the time is accomplished, how can I execute or insert a statement like destruction or even more than one statement?

The only thing I'm thinking about is to create another field and store the statement that will be executed on the completion of the job.

  Create table `dbkorsanx` .`TBLPROCESSES` (` id` INT no NULL AUTO_INCREMENT, `PROCESS_ENDS_AT` DATETIME zero,` PROCESS_STATEMENT` text zero, primary key (`ID`));   

Is there a better idea for this?

After

instead of asking the query directly, save in DB what you want to update is a type Can be flag, user_id, or some other meta data if its variables save as length some JSN or so

I have a cron that will be implemented every ten minutes or in the service. Depending on your logic, service / script can run the required questions.

No comments:

Post a Comment