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 can we encrypt the password using php?

747


Is it more secure to use cookies to trfer session ids?

718


Which is faster for or foreach?

700


What do you mean range() in php?

814


What is orm in php framework?

734


Is gender a dependent variable?

721


What is isset post?

765


How to create reusable code in php?

752


What is overloading in php?

737


What is different types of visibility?

700


What is the php function that removes the first element of the array and returns it?

728


Does php 5 support exceptions?

885


What version of php do I have windows?

681


How are php sessions stored?

724


How is it possible to know the number of rows returned in result set?

748