How to drop a table in MySQL using PHP

Drop Table Example PHP uses mysqli query() or mysql_query() function to drop a MySQL table. This function takes two parameters and returns TRUE on success or FALSE on failure. Syntax $mysqli->query($sql,$resultmode) Sr.No. Parameter & Description 1 $sql Required – SQL query to drop a table. 2 $resultmode Optional – Either the constant MYSQLI_USE_RESULT or Read more…

How to drop a database in MySQL

Drop A DataBase PHP uses mysqli query() or mysql_query() function to drop a MySQL database. This function takes two parameters and returns TRUE on success or FALSE on failure. Syntax $mysqli->query($sql,$resultmode) Sr.No. Parameter & Description 1 $sql Required – SQL query to drop a MySQL database. 2 $resultmode Optional – Either the constant MYSQLI_USE_RESULT Read more…

How to create a database with MySQL

Create DataBase PHP uses mysqli query() or mysql_query() function to create or delete a MySQL database. This function takes two parameters and returns TRUE on success or FALSE on failure. Syntax $mysqli->query($sql,$resultmode) Sr.No. Parameter & Description 1 $sql Required – SQL query to create a MySQL database. 2 $resultmode Optional – Either the constant Read more…

How to connect database through PHP

Connect DataBase Example PHP provides mysqli contruct or mysqli_connect() function to open a database connection. This function takes six parameters and returns a MySQL link identifier on success or FALSE on failure. Syntax $mysqli = new mysqli($host, $username, $passwd, $dbName, $port, $socket); Sr.No. Parameter & Description 1 $host Optional − The host name running Read more…

What is PHP & MySQL Overview

PHP&MySQL Overview MySQL works very well in combination of various programming languages like PERL, C, C++, JAVA and PHP. Out of these languages, PHP is the most popular one because of its web application development capabilities. PHP provides various functions to access the MySQL database and to manipulate the data Read more…