Here is my situation:
I have 3 computers all running the same web application (a custom cash register and sales system), the file structure is as follows:
cashreg.js = javascript app that runs the register and communicates via ajax methods with a server side php script
cashreg_ajax.php = the server side script that does MySQL stuff.
What is happening is that occasionally, two registers will process transactions at the same time (or really close to it) and sometimes when this happens, the items get mixed up between the two registers. I have a variable to identify register number and this is passed to the php script via GET. I have done some local testing and found that if I process a transaction at the same time, I will get some that don't wind up with a receipt on one register and sometimes, the receipt will print on the wrong receipt printer (belongs to the other cash register and is also identified through the registernum variable.
What happens when a php script is being called at the same time from two different clients.
BTW - my ajax calls are async.
I can post code if needed. It just seems like the requests are getting stepped on by the other client some.
Thanks,
LJ Wilson
I have 3 computers all running the same web application (a custom cash register and sales system), the file structure is as follows:
cashreg.js = javascript app that runs the register and communicates via ajax methods with a server side php script
cashreg_ajax.php = the server side script that does MySQL stuff.
What is happening is that occasionally, two registers will process transactions at the same time (or really close to it) and sometimes when this happens, the items get mixed up between the two registers. I have a variable to identify register number and this is passed to the php script via GET. I have done some local testing and found that if I process a transaction at the same time, I will get some that don't wind up with a receipt on one register and sometimes, the receipt will print on the wrong receipt printer (belongs to the other cash register and is also identified through the registernum variable.
What happens when a php script is being called at the same time from two different clients.
BTW - my ajax calls are async.
I can post code if needed. It just seems like the requests are getting stepped on by the other client some.
Thanks,
LJ Wilson