MySQL connection syntax with example in php
Answers
Answered by
0
Answer:
Open a Connection to MySQL
Example (MySQLi Object-Oriented) <? $servername = "localhost"; $username = "username"; ...
Example (MySQLi Procedural) <? $servername = "localhost"; ...
Example (PDO) <? $servername = "localhost"; ...
MySQLi Object-Oriented: $conn->close();
MySQLi Procedural: mysqli_close($conn);
PDO: $conn = null;
Explanation:
HOPE IT HELPS........
Answered by
2
Open a Connection to MySQL
- Example (MySQLi Object-Oriented) <? $servername = "localhost"; $username = "username"; ...
- Example (MySQLi Procedural) <? $servername = "localhost"; ...
- Example (PDO) <? $servername = "localhost"; ...
- MySQLi Object-Oriented: $conn->close();
- MySQLi Procedural: mysqli_close($conn);
- PDO: $conn = null
this is the answer.
Similar questions