Shifting from normal PHP scripts to PDO Scripts.

PHP Scripts are used a lot but on changing the trend is the new PDO Scripts. Moreover shifting from normal servers to AWS server i.e Amazon Web Services then we have to use PDO scripts.
There are a lot of new things to do in PDO Scripts but some main points are to be followed while converting them.

Retrival -
mysql_query is changed with $DBH->query()
 where $DBH is the reference variable of the Object in PDO

setFetchMode(FETCH_MODE::ASSOC);
This mode is used for the retrieval of associative array

Insertion and Updation- 
For insertion and updation prepare statements are used. Statements are prepared using the command as shown. There is an array which is used for the creation of prepared statements.
$array=array("Values");
$DBH->prepare("Prepare Statement");

Comments

Popular posts from this blog

Styling Bottom Navigation

Lottie Animation in Android

Minimum Required SDK – Target SDK – Compile With