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 what are the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?

1 Answers  


Explain what are the two main string operators?

1 Answers  


How do you put a space in html?

1 Answers  


i m a B.E,passed out few yrs bak failed to find good job due to less marks now thinkin of a career as PHP developer. is it a lucarative field and wat r career prospects; hv heard dat initial salary is very less bout 6k also most jobs r contrct jobs.pls guide me need ur valuable advice.pls hellppp!! thnx..

1 Answers   MNC,


What are the advantages of stored procedures, triggers, indexes in php?

1 Answers  


What is the use of array_search() in php?

1 Answers  


How to find the length of a string?

1 Answers  


What is php's mysqli extension?

1 Answers  


What is the use of Php variables?

1 Answers  


Explain the purpose of output buffering in php.

1 Answers  


What are sql injections, how do you prevent them and what are the best practices?

1 Answers  


Why session timeout is important?

1 Answers  


Categories