Showing posts with label MYSQL vs MYSQLI vs PDO. Show all posts
Showing posts with label MYSQL vs MYSQLI vs PDO. Show all posts

Saturday, April 11, 2026

MYSQL vs MYSQLI vs PDO


 
<?php

//mysql

//$conn = mysql_connect("localhost","root","");
//$db = mysql_select_db("Your_database_name", $conn);

//mysqli

//$conn = mysqli_connect("localhost","root","","Your_database_name");

//PDO
$conn = new PDO("mysql:host=localhost;dbname=Your_database_name","root","");  



if(!$conn){

echo "Not connected";
}
else{

echo "Connected PDO";
}

🔌 Learn Breadboard Courses – Turn Ideas Into Real Electronic Projects!

  Step into the exciting world of electronics and innovation with our Breadboard Learning Courses . Learn how real circuits work, connect co...