SQL design

admin

Administrator
Staff member
Dear all,

I\'m setting up an events database where a user can enter in an event from a webform, and have it displayed in another webpage when submitted.

How does this look for the SQL?

CREATE TABLE events (
event_id int(4)
unsigned
zerofill
DEFAULT \'0000\'
NOT NULL
auto_increment,
event_name varchar(50),
event_date date,
event_status tinyint(1),
event_text text,
PRIMARY KEY (event_id)
);

I want the event_status to store either 1 or 0 for true or false. Is tinyint a good choice for datatype?

Thanks,
cotth
 
Back
Top