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

What is the difference between for and foreach in php?

0 Answers  


How are variables declared in php?

0 Answers  


How to call php function in jquery?

0 Answers  


What is difference between compile time and run time polymorphism?

0 Answers  


What is php static function?

0 Answers  






What is the tags in PHP is not a valid way to begin and end a PHP code block?

0 Answers  


What is the difference between fopen() and fclose()?

0 Answers  


Define soundex()?

0 Answers  


What is the difference between characters 34 and x34?

0 Answers  


Can we override magic methods in php?

0 Answers  


What are the delimiters in php?

0 Answers  


How does cookies work in php?

0 Answers  


Categories