Results 1 to 6 of 6

Thread: Did I setup mySQL table properly? + Password question.

Threaded View

  1. #1

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819

    Did I setup mySQL table properly? + Password question.

    OK, this is really just an exercise for me to familiarize myself with how this all works and setting things up properly. So I'm making a guest book. I wasn't sure what the difference was between char, varchar, and the different text types. I kept getting errors when I was created fields using the text types, so I switched them to char. Maybe that's because I was trying to define the max length of the field? The documentation isn't all that great.

    Anyway, I've also read several things that say don't store the password in database. I want the users to be able to change their own entries, but only read other entries (with the exception of e-mail addresses). Basically the same as this forum works.

    Also, to contect to the database, I have to put my master password for my web hosting account. What's to stop someone from figuring out my password and having at it with my account? The password will need to be in the connection string to the database. What is it that I'm not understanding here?

    Here's how I set up the table sans password. Is this how it should be?
    Database guestbook - table Guests running on localhost
    table Guests has been altered.

    Field Type Attributes Null Default Extra Action
    GuestID bigint(20) No auto_increment Change Drop Primary Index Unique Fulltext
    FirstName varchar(15) No Change Drop Primary Index Unique Fulltext
    LastName varchar(15) No Change Drop Primary Index Unique Fulltext
    MiddleInitial char(1) No Change Drop Primary Index Unique Fulltext
    UserName varchar(15) No Change Drop Primary Index Unique Fulltext
    EMail varchar(125) No Change Drop Primary Index Unique Fulltext
    Date date No 0000-00-00 Change Drop Primary Index Unique Fulltext
    Comments longtext No Change Drop Primary Index Unique Fulltext
    With selected: Or


    Indexes : [Documentation]
    Keyname Type Cardinality Action Field
    PRIMARY PRIMARY 1 Drop Edit GuestID
    GuestID UNIQUE 1 Drop Edit GuestID
    Last edited by cafeenman; May 8th, 2002 at 01:54 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width