How will you create a mysql database using php ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is it possible to parse a configuration file?

505


What is print_r?

506


what are interfaces and Abstart classes

1457


How to read and display a HTML source from the website url?

553


What is meant by variable variables in php?

524






What is the use of Php variables?

580


How to convert numbers to strings in php?

515


What is overloading in php?

543


What is the interface in php?

530


How to read a file in binary mode?

631


What is php array function?

535


Tell me how is the ternary conditional operator used in php?

564


Tell me how to get the value of current session id?

503


Why does sql injection happen?

563


Does php pass arrays by reference?

561