Home > DeveloperSection > Forums > There are some problem in creation of database

Total Post:21

Posted on    October-26-2010 9:51 AM


 1 Reply(s)
 1418  View(s)
Rate this:
how we create database in mysql with php
please give syntex
thanks in advance

Amit Singh

Total Post:103

Posted on    November-08-2010 12:38 AM

Create database between mysql and php
using syntax
Create database databaseName

we write syntax in php for creation of database
$con = mysql_connect("localhost","sa","sa");
if (!$con)
  die('Could not connect: ' . mysql_error());

if (mysql_query("CREATE DATABASE my_db",$con)) //Create database and check the condition
  echo "Database created";
  echo "Error creating database: " . mysql_error();


Recent Activities

Sumit Kesarwani added new Question What is the Vector class in java?   2 days ago

Anchal Kesharwani added new Blog JSON Syntax   9 days ago

Anchal Kesharwani added new Article How to Send Mail in Node.JS   9 days ago

Top Contributors

Don't want to miss updates? Please click the below button!