Sponsored By
Advertise with Us
Advertisement
Advertise with Us
Follow Us
Article
Forum
Blog
Quiz
Beginner
Careers
Contact
Login
Email Id
Password
Remember Me
Forgot Password?
Sign Up
Home
|
Product
|
Services
|
About Us
|
Interview
|
DeveloperSection
|
Submit an Article
|
Submit Blog
Report Abuse Form
Reason:
Home
>>
Database
>>
MYSQL
>>
There are some problem in creation of database
Author
Post
Somesh
Total Post:
21
Member Since:
10/26/2010
Points:
107
There are some problem in creation of database
Posted On:
10/26/2010 9:51:06 AM
Report Abuse
how we create database in mysql with php
please give syntex
thanks in advance
Reply
Author
Post
Amit Singh
Total Post:
104
Member Since:
8/8/2010
Points:
702
Re: There are some problem in creation of database
Posted On:
11/8/2010 12:38:29 AM
Report Abuse
Create database between mysql and php
using syntax
Create database
databaseName
we write syntax in
php
for creation of database
Example
<?php
$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";
}
else
{
echo "Error creating database: " . mysql_error();
}
mysql_close($con);
?>
Reply
Report Abuse Form
Reason:
Total Online Users:
6158
Advertisement
Advertise with Us
Copyright ©
2009 - 2013
MindStick. All Rights Reserved.
Home
|
Contact Us
|
Services
|
Feedback
|
Advertisement
|
Privacy Policy
|
Term & Conditions
|
About Us