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

$tbl_users = "CREATE TABLE IF NOT EXISTS users (
          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) 


Recommended Answers

All 3 Replies

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

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.