0

How would I add a birthday section to this section of code?

$tbl_users = "CREATE TABLE IF NOT EXISTS users (
          id INT(11) NOT NULL AUTO_INCREMENT,
          username VARCHAR(16) NOT NULL,
          email VARCHAR(255) NOT NULL,
          password VARCHAR(255) NOT NULL,
          gender ENUM('m','f') NOT NULL,
          country VARCHAR(255) NOT NULL,
          avatar VARCHAR(255) NULL,
          ip VARCHAR(255) NOT NULL,
          signup DATETIME NOT NULL,
          lastlogin DATETIME NOT NULL,
          notescheck DATETIME NOT NULL,
          activated ENUM('0','1') NOT NULL DEFAULT '0',
          PRIMARY KEY (id),
          UNIQUE KEY username (username,email)
         )";

Is this right for a video section?

$tbl_videos = "CREATE TABLE IF NOT EXISTS videos ( 
            id INT(11) NOT NULL AUTO_INCREMENT,
            user VARCHAR(16) NOT NULL,
            gallery VARCHAR(16) NOT NULL,
            filename VARCHAR(255) NOT NULL,
            description VARCHAR(255) NULL,
            uploaddate DATETIME NOT NULL,
            PRIMARY KEY (id) 
            )"; 

Thanks.

2
Contributors
3
Replies
18
Views
4 Years
Discussion Span
Last Post by Squidge
1

This is just the SQL code for the table.

You need to add an additional column for example bday DATE NOT NULL,

Change bday to what you want it to be called

0

Thanks, appologies for my lack of knowledge, I'm just learning as I go right now. Is my video table right?

Edited by hbm11

1

No probs fellow, we all start somewhere.

With videos/pictures i personnally wouldnt store the vid in the SQL table (some do, some dont).

I would store the name, and link to the video only. This reduces the call time and also the size of your table.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.