C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
PHP MySQL Create DatabaseSince PHP 4.3, mysql_create_db() function is deprecated. Now it is recommended to use one of the 2 alternatives.
PHP MySQLi Create Database ExampleExample'; $sql = 'CREATE Database mydb'; if(mysqli_query( $conn,$sql)){ echo "Database mydb created successfully."; }else{ echo "Sorry, database creation failed ".mysqli_error($conn); } mysqli_close($conn); ?> Output: Connected successfully Database mydb created successfully.
Next TopicPHP MySQL Create Table
|