In this tutorial I will show you How to Insert JSON Data into MySQL using PHP. To convert JSON to MySQL using PHP includes some steps like how to read JSON file, convert json to array and insert that json array into MySQL database. Here are the steps to Insert JSON data into MySQL using PHP. Step 1: Read the JSON file in PHP We have to read the JSON …
MySQL Tutorials
MySQL server has gone away in Magento
Recently I faced a problem MySQL server has gone away in Magento when I was moved the code from one hosting to another hosting. Actually the problem came into notice when I try to place order sometimes it sends me back to cart page and sometimes after the successful payment via standard PayPal the order status didn’t change and remain as pending payment. Then I trace the problem by checking …
Difference between mysql and pdo
In this post I am discussing the difference between mysql and pdo with example and explanation. So let’s have a look on this. What is PDO? PDO – PHP Data Objects – is a database access layer providing a uniform method of access to multiple databases. PHP PDO => Database Driver => DATABASE Connection to MySQL database: In mysql function we can connect to the database by following code: In …
Mysql functions deprecated in PHP 5.5
As mysql functions are deprecated from PHP 5.5 and above. PHP offers three different APIs to connect to MySQL. These APIs are mysql, mysqli and PDO extensions. The mysql_* functions are very popular, but their use is not encouraged anymore now. PHP developer team is discussed about the database security and has taken the decision to generate E_DEPRECATED errors when users connect to MySQL, whether through mysql_connect(), mysql_pconnect(). When you …