What is the command used to create a database using php and mysql?



What is the command used to create a database using php and mysql?..

Answer / Jaswant Singh

To create a database using PHP and MySQL, you can use the mysqli_query() function. Here is an example:nn```phpn$db = new mysqli('localhost', 'username', 'password', null, 'database_name');nif ($db->connect_error) {ndie('Connection failed: ' . $db->connect_error);n}n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

What are the purposes of using enum and set data types?

1 Answers  


What is DML in MySQL?

1 Answers  


How to return query output in html format?

1 Answers  


What is the latest mysql?

1 Answers  


What is blob storage?

1 Answers  


What is 'mysqlshow'?

1 Answers  


How do I run mysql from command line?

1 Answers  


How to create a table index in mysql?

1 Answers  


What is the storage engine used for MySQL?

1 Answers  


How do you create a schema?

1 Answers  


How can I insert images into a Mysql database?

1 Answers  


Give the syntax of Grant and Revoke commands?

1 Answers  


Categories