konrms
3 months ago
64
11
Laravel

Forbidding access to database while another user requests data from it

Posted 3 months ago by konrms

Hello fellows,

How can I exclude a user from accessing my database when another user has already requested data from it?

To be more specific for my case, when a user browses to my laravel site he/she fills a form and then submits it. This triggers an oracle db query and several tables are created in the background before producing and showing the final result on browser. If another user fills the same form with different initial data at the same time then the db temporary table data is messed and I get the laravel error page.

Is it possible to have the second (or third etc) concurrent form submission standing by the previous to be completed first? I think it's called the mutual exclusion problem.

PS: All this happens when using local xampp apache server and testing to open two laravel webpages and submitting data almost simultaneously. Will this be happening on a live server environment?

Please sign in or create an account to participate in this conversation.