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)
 1798  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

Mayank Tripathi added new Question Why do threads block on I/O?   3 hours ago

Tarun Kumar added new Article iOS : Creating Sample on Core Data   7 hours ago

Derek Honeybun added new Blog iOS : Core Data Framework   4 days ago

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