Jump to content


Photo

help me make a new database for my forums


  • Please log in to reply
5 replies to this topic

#1 pwnedbyjosh

pwnedbyjosh
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 01 September 2003 - 01:39 AM

i already have a database which i want to delete but i also want to make 2 more databases. how do i do it

#2 nysebamse

nysebamse
  • Members
  • PipPip
  • Member
  • 16 posts
  • LocationBergen, Norway

Posted 01 September 2003 - 07:38 AM

To delete an entire database:

DROP DATABASE IF EXISTS db_name

To create a new database:
CREATE DATABASE IF NOT EXISTS db_name

See also www.mysql.com for documentation on MySQL.
Go get Firefox![br][br]http://www.mozilla.org/

#3 pwnedbyjosh

pwnedbyjosh
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 01 September 2003 - 08:16 AM

where do i enter that?

#4 nysebamse

nysebamse
  • Members
  • PipPip
  • Member
  • 16 posts
  • LocationBergen, Norway

Posted 01 September 2003 - 08:19 AM

How do you access your mysql database? With PHPMyAdmin?
Go get Firefox![br][br]http://www.mozilla.org/

#5 pwnedbyjosh

pwnedbyjosh
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 01 September 2003 - 05:26 PM

are u saying i use phpmyadmin to gewt to it? where do i d/l it?

#6 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,023 posts

Posted 09 September 2003 - 06:51 PM

where do i enter that?


You can do it from php

[php:1:af123983bd]<?php
mysql_query (\"DROP DATABASE IF EXISTS db_name\");
mysql_query (\"CREATE DATABASE IF NOT EXISTS db_name\");
?>[/php:1:af123983bd]

hth
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users