News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Thilanka Kaushalya's Blog:
How to use Mysql Transactions with PHP
March 20, 2012 @ 13:04:37

In this recent post to his blog Thilanka Kaushalya shows how to use transactions in MySQL databases (using mysqli

Web applications are more popular today than ever with the increasing number of internet users. Most of the standard alone applications converted as web based applications or at least they try to provide a web interface for users. PHP and Mysql are two leading technologies which allow uses on rapid development of web based systems. "Transaction" is a powerful concept which comes with Mysql 4.0 and above versions. Lets explore that.

He introduces the concept of transactions first, providing an example of a bank transfer between two individuals. He uses this to create a simple code sample that turns off the autocommit for the connection (using mysqli_autocommit set to false) and running the SQL in order before the commit. He also includes an example of using the rollback function to return the data back to its original state if there's an error.

0 comments voice your opinion now!
mysql transactions mysqli tutorial rollback


Cal Evans' Blog:
Only YOU can prevent web failures
May 03, 2010 @ 09:37:20

Cal Evans has a reminder to all of the businesses out there that have sites and use web site hosting services - only you can prevent web failures and potentially alienate customers.

Last night I wrote the info@ email address on a website and asked a questions about their product. They politely responded with two links to their website. This morning however, when I went to visit them, I was greeted with the message above. It's now three hours later and the site is still "experiencing difficulties". [...] This problem can be prevented by business owners insisting on - and paying for - "Best Practices" in their software vendors.

He offers a few suggestions to businesses to help prevent this sort of (catastrophic?) failure for their businesses including having a rollout and rollback plan and having a good set of tests to make doubly sure things work before the code even meets the public.

0 comments voice your opinion now!
failure company webhost unittest rollback


DevShed:
Implementing the commit() and rollback() Methods with mysqli and PHP 5
July 08, 2006 @ 09:53:46

Continuing on with their "mysqli in PHP5" series, DevShed has posted part two highlighting the commit and rollback functions - their use and functionality.

This is the second part of the series "Using mysqli with PHP 5." Welcome back. In three tutorials, this series shows how to use the most important methods and properties included in the "mysqli" extension that comes with PHP 5, in order to take advantage of the new features bundled with MySQL 4.1 and above.

In part one they introduced the extension, providing the background for those just joining in. In this latest part, they take it to the next level and talk about these new handy functions - one to save the updates/additions you're making to the database and the other to undo those changes quickly and easily. As always, there's plenty of examples, explainations, and code to go around.

0 comments voice your opinion now!
mysql commit rollback mysqli php5 tutorial mysql commit rollback mysqli php5 tutorial



Community Events





Don't see your event here?
Let us know!


series symfony language laravel library podcast tips interview release introduction community install list api bugfix opinion voicesoftheelephpant package framework deployment

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework