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 does == mean in php?

0 Answers  


Tell me in php, objects are they passed by value or by reference?

0 Answers  


What are the new features available in php 7?

0 Answers  


What are the different components used in php for formatting?

0 Answers  


What are the different tables(engine) present in mysql, which one is default?

0 Answers  






Is echo a function in php?

0 Answers  


How can cross site request forgery csrf be prevented?

0 Answers  


Tell me how do you execute a php script from the command line?

0 Answers  


What type of language is php?

0 Answers  


Write a program in php to find the occurrence of a word in a string?

0 Answers  


Explain some most commonly use string functions in php?

0 Answers  


m new to xampp i want to configure file server in xampp... is it possible ??? if so help me....

0 Answers  


Categories