Breaking News

transactions – How can I force that when a php file executes, it executes all the code or nothing?


I am calling a php file from another php file with include instruction. What I want is that when I call that php file, I want the entire file to be executed or that no line in that file is executed.

In SQL it would be like a transaction, but in php I don´t know if that´s possible. Is there any way to do that?

What I mean is that when I use include, the whole file runs and it takes about 5 seconds. If during those 5 seconds there is an interruption, the execution is halfway and leaves incomplete files. That is why I want the entire file to run or that no line is executed. I´m doing some operations with a MYSQL database and session variables declarations

How to&Answers:

About rankhawks

Check Also

php – i want to insert data into database directly from a table (view) but when i click add btn only the first or the last row get insterted

Questions: here in this code i have passed the hardcoded value of month if i …

How can i redirect unstructured link like ( using .htaccess?

Questions: There is a issue of unstructured link like ( How can I redirect its …

php – Enable ZTS on apache CentOS7

Questions: I’m on Centos 7 / apache. I compiled php with ZTS and compiled pthreads. With …

php – JSON: Update base64 string using url JSON

Questions: I’m new to JSON Code. I want to learn about the update function. Currently, …

mysql – Translating sql query to table with php

School Name Summary Expenditure Report For Month SN /td> Sub Total Sub Total

Leave a Reply

Your email address will not be published. Required fields are marked *