How will you create a mysql database using php ?

Answer Posted / modi[achir communication]

<?php

$linkid = mysql_connect("servername", "username", "password");
mysql_query("CREATE DATABASE db");
mysql_select_db("db");

mysql_query("CREATE TABLE table (...)");

?>

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between python and php?

517


What is the difference between overloading and overriding in php?

541


What are some of the advanced features of php?

504


What is the difference between myisam and innodb?

509


What does php do?

535






Will react hooks replace redux?

511


What is session management php?

534


How can we access the data sent through the url with the post method?

507


What is a stored procedure in mysql?

531


How is it possible to know the number of rows returned in the result set?

547


What is the difference between htmlentities and htmlspecialchars in php?

480


What is the importance of "action" attribute in a html form?

538


What is mysql_fetch_object?

560


Write a php function to convert all null values to blank?

788


what is variable scope, which variables are accessible from where and what are "undefined variable" errors?

508