Database set-up

Reply

Join Date: Oct 2006
Posts: 75
Reputation: welbyobeng is an unknown quantity at this point 
Solved Threads: 0
welbyobeng welbyobeng is offline Offline
Junior Poster in Training

Database set-up

 
0
  #1
Dec 24th, 2008
Hey how will I write a text file to setup a database with the information below



Database set-up:

Members Table:
id - int primary key auto_increment.
username - varchar 15.
password - varchar 32. will be a md5 and sha1 hash of the password then the username.
e-mail - varchar 35.
admin - tinyint. will either be a value of 1 (admin) or the default, 0 (regular member)
last_ip - varchar 15. will store the last ip address person logged in with.

Buddy List:
uid - User ID from members table. int.
buddy - Buddies username or id. either varchar 15 or int.
blocked - Blocked users username or id. either varchar 15 or int.

Messages:
id - message id. int primary key auto_increment.
from - users name. varchar 15 characters.
to - buddies name. varchar 15 characters.
message - blob
time - timestamp CURRENT_TIMESTAMP.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 165
Reputation: Fest3er is an unknown quantity at this point 
Solved Threads: 18
Fest3er Fest3er is offline Offline
Junior Poster

Re: Database set-up

 
0
  #2
Dec 25th, 2008
You're on your own for accessing the MySQL server.

The following statements usually work for creating databases and tables:
  1. CREATE DATABASE;
  2. USE;
  3. CREATE TABLE a (field1, field2, ..., key);

Download the MySQL manual (PDF) and peruse the syntax of the aforementioned statements. I taught myself MySQL by RTFMing, though I did have a slight head start by having learned Informix 15 years earlier, so SQL wasn't a completely foreign language.

N
Last edited by Fest3er; Dec 25th, 2008 at 12:52 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC