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

Write a program to find no of days between two dates in php?

0 Answers  


hi sir am kiran kumar finished my mca 2009 passed out sir .. i have more doubts regarding open source technologies sir if we pass zend exam in php can we get a job opportunity in foreign countries sir and is it good demand for php compared to dot net and java and some other technologies like sap , erp sir bcoz my friends saying they are finished dot net and java courses they telling in php we cannot earn more and we cannot go onsite opportunity even big companies not dealing with php is it right ah sir ? please send ur valuable suggestions to my email sir kiranpulsar2007@gmail.com please send ur phone number also sir thanking u sir

1 Answers  


What is use of count() function in php?

0 Answers  


what is the difference between GET,POST and REQUEST in php

1 Answers  


Is salary a ratio or interval?

0 Answers  






Tell me what is the use of the function htmlentities?

0 Answers  


What is a php trait?

0 Answers  


How to find the length of a string?

0 Answers  


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

0 Answers  


How to create an empty array in php?

0 Answers  


What is list in PHP?

0 Answers  


How can I make a script that can be bilanguage (supports English, German)?

3 Answers  


Categories