Hi,
Is there is any option to create mysql data base automatically without using cpanel to create database, I use the following code but it does not create's Db on website.
mysql_query("CREATE DATABASE fig",$connection);
It creates DB in local but not in website?
|
Light Poster
|
|
| 30Dec2008,14:58 | #2 |
|
Quote:
Originally Posted by divinequran PHP Code:
|
|
Newbie Member
|
|
| 30Dec2008,19:16 | #3 |
|
simple db creation is
mysql_connect("localhost","root",""); mysql_select_db("databasename"); mysql_query("select * from tablename"); |
|
Light Poster
|
|
| 30Dec2008,20:25 | #4 |
|
Huh? thats not how you create a database, its pretty much what i posted but way simpler and no connecting? That is how you select a database. Well not even, since you missed out some code.
|
|
Contributor
|
|
| 4Jan2009,22:16 | #5 |
|
Yes, iam able to connect to database and do manipulation after creation database on my site, i want to know is there is any option to create db using code without using cpanel
|
|
Light Poster
|
|
| 7Jan2009,01:26 | #6 |
|
PHP Code:
|
|
Contributor
|
|
| 16Jan2009,21:56 | #7 |
|
Finally my hosting company said database have to be created manually and they wont authorize to create DB using code. Thanks for your reply
|

