Transactions

A transaction is an indivisible unit of work. That said, a transaction cannot be divided or separated. In databases, a transaction involves multiple queries that require successful execution. If successfully executed, the transaction is committed. If one of the queries fails to execute, a rollback should be used for the entire transaction or parts of…

PHP: MySQLi Fetch

The following are common methods used to fetch data from a database using MySQLi. mysqli_stmt_fetch() Fetch results from a prepared statement into the bound variables. mysqli_fetch_all() Fetches all result rows and returns the result set as an associative array, a numeric array, or both. Available only with mysqlnd. mysqli_fetch_array()Fetch a result row as an associative, a…