SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2003
    Location
    Boston
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Questions regarding PHP Anthology II signup.SQL

    A couple questions regarding the following. The following code was taken from the PHP Anthology II, signup.sql. Why is "email", "firstname", and "lastname" default NULL if they are required fields? Also, why not declare "created" as a date or datetime? Lastly, what is the significance of "user_login"?

    Code:
    CREATE TABLE signup (
      signup_id int(11) NOT NULL auto_increment,
      login varchar(50) NOT NULL default '',
      password varchar(50) NOT NULL default '',
      email varchar(50) default NULL,
      firstName varchar(50) default NULL,
      lastName varchar(50) default NULL,
      signature text NOT NULL,
      confirm_code varchar(40) NOT NULL default '',
      created int(11) NOT NULL default '0',
      PRIMARY KEY  (signup_id),
      UNIQUE KEY confirm_code (confirm_code),
      UNIQUE KEY user_login (login),
      UNIQUE KEY email (email)
    ) TYPE=MyISAM;
    -Lewis

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2003
    Location
    Boston
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anyone?
    -Lewis


Bookmarks

Posting Permissions

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