Posts Tagged with 'PHP-MySQL'
ChartJS | How to draw Bar chart from server data using MySQL, Ajax and PHP
Chart.JS | Draw Bar chart from server data using MySQL, Ajax, and PHP This example shows how to draw a bar chart with data from the database server. FILE STRUCTURE At the end of this …
How to use php array with sql IN operator?
SQL | IN operator with PHP Array In this article we will use PHP Array with SQL IN operator. SQL IN operator allows us to specify multiple values in where clause. So in this article …
How we can find last insert id in table?
MySQL | Find last insert id in the table By using the MySQL function mysqli_insert_id() we can retrieve the last inserted id in the database table. <?php $con = mysqli_connect("localhost","user_name","user_password","db_name"); if (mysqli_connect_errno()) { echo …
Give an example of Transaction with commit and rollback?
PHP-MySQL | Transaction with commit and rollback try { // First of all, let's begin a transaction $db->beginTransaction(); // A set of queries; if one fails, an exception should be thrown which we are handling at …