duplicate database name

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

crue
New php-forum User
New php-forum User
Posts: 9
Joined: Sun Jun 22, 2003 6:51 pm

duplicate database name

Postby crue » Sun Jun 22, 2003 7:04 pm

Hi all,
Is there a way to get around from duplicating database?
This is the code to create database:
mysql_create_db("somedb")or die("Create Error: ".mysql_error());
>this works fine, but on the second load of the the page it takes forever (had to close the browser)
(I know my system is pretty old: Duron 700 w/ 128 RAM, but it shouldn't take forever????)

thank's in advance........

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Postby Redcircle » Sun Jun 22, 2003 9:50 pm

You should only need to create the DB once and only once. Usually I setup the actual db from phpmyadmin.

also almost all shared hosts do not allow db create access to thier users outside of a control panel.

My guess as to why it fails is because it's already created and mysql gets hung up on it.

crue
New php-forum User
New php-forum User
Posts: 9
Joined: Sun Jun 22, 2003 6:51 pm

Postby crue » Mon Jun 23, 2003 8:39 pm

yap, that's what I thought.......
Everything works fine when I took out the 'create_db' function from the script.

thank's


Return to “PHP coding => General”

Who is online

Users browsing this forum: Google Feedfetcher and 1 guest