How will you create a mysql database using php ?

Answers were Sorted based on User's Feedback



How will you create a mysql database using php ?..

Answer / suma

mysql_create_db('dbname')

Is This Answer Correct ?    30 Yes 1 No

How will you create a mysql database using php ?..

Answer / 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

How will you create a mysql database using php ?..

Answer / mruttu

mysql_connect('servername','username','password');

Is This Answer Correct ?    5 Yes 18 No

Post New Answer

More PHP Interview Questions

How to protect special characters in query string?

0 Answers  


How to download and install php for windows?

0 Answers  


What are some of the advanced features of php?

0 Answers  


what are the rules to be followed at the time of declaring a variable?,what is the purpose of var_dump()function in php,syntax of ternary operator()in php,difference between drop a table and truncate a table...

2 Answers  


Does php need html?

0 Answers  






How to change the principal password?

0 Answers  


Write syntax to open a file in php?

0 Answers  


What is the difference between for and foreach?

0 Answers  


What is c++ polymorphism?

0 Answers  


How can we submit from without a submit button?

0 Answers  


Why is php used?

0 Answers  


Do you know how to enable error reporting in php?

0 Answers  


Categories