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

Explain me how failures in execution are handled with include() and require() functions?

0 Answers  


Explain the difference between urlencode and urldecode?

0 Answers  


When to use inquire vs enquire?

0 Answers  


What is fulltextsearch

2 Answers   A1 Technology,


What are the security measures we have to take for our site not to hack by others.

3 Answers   Infosys, Torque Infotech,


What is the name of scripting engine in php?

0 Answers  


What is polymorphism?

0 Answers  


describe arguments in header in php?

1 Answers  


Write a program to find a string is palindrome or not?

0 Answers  


Explain me differences between get and post methods?

0 Answers  


What is the difference between implode() and explode() in php?

0 Answers  


Which is the best method to fetch the data from mysql? 1.mysql_fetch_array() 2.mysql_fetch_object() 3.mysql_fetch_row() 4.mysql_fetch_assoc()

6 Answers  


Categories