Hi
I am currently working on a site which visitors can submit & search links to various resources. I am trying to set up an advanced search feature (similar to google) and I have several ENUM Fields within the table that I want visitors to be able to check or uncheck within the search. I also have a username table and would like to be able to measure the popularity of a link so that I can have rankings for different types of resources and count the numbr of times a user submits a link, which user submits which link, number of times a user clicks on a link etc. I am v. new to database design and am not sure whether the ENUM fields should be in a seperate table or whether to keep it as it is:
CREATE TABLE `lnks` (
`lnk_id` int(11) NOT NULL auto_increment,
`lnk_name` varchar(45) NOT NULL default '',
`lnk_desc` text NOT NULL,
`lnk_url` varchar(120) NOT NULL default '',
`lnk_a1` enum('Yes','No') default 'No',
`lnk_a2` enum('Yes','No') default 'No',
`lnk_a3` enum('Yes','No') default 'No',
`lnk_a4` enum('Yes','No') default 'No',
`lnk_a5` enum('Yes','No') default 'No',
`lnk_a6` enum('Yes','No') default 'No',
`lnk_a7` enum('Yes','No') default 'No',
`lnk_a8` enum('Yes','No') default 'No',
`lnk_a9` enum('Yes','No') default 'No',
`lnk_a10` enum('Yes','No') default 'No',
`lnk_a11` enum('Yes','No') default 'No',
`lnk_a12` enum('Yes','No') default 'No',
`lnk_a13` enum('Yes','No') default 'No',
`lnk_a14` enum('Yes','No') default 'No',
`lnk_a15` enum('Yes','No') default 'No',
`lnk_a16` tinyint(127) NOT NULL default '1',
PRIMARY KEY (`lnk_id`),
UNIQUE KEY `lnk_id` (`lnk_id`)
) TYPE=InnoDB
It would also be v. helpful to know the best way to set up the 'advanced form' and the query/recordset i.e. the SQL Statement.
Hope you can help!?!
I am currently working on a site which visitors can submit & search links to various resources. I am trying to set up an advanced search feature (similar to google) and I have several ENUM Fields within the table that I want visitors to be able to check or uncheck within the search. I also have a username table and would like to be able to measure the popularity of a link so that I can have rankings for different types of resources and count the numbr of times a user submits a link, which user submits which link, number of times a user clicks on a link etc. I am v. new to database design and am not sure whether the ENUM fields should be in a seperate table or whether to keep it as it is:
CREATE TABLE `lnks` (
`lnk_id` int(11) NOT NULL auto_increment,
`lnk_name` varchar(45) NOT NULL default '',
`lnk_desc` text NOT NULL,
`lnk_url` varchar(120) NOT NULL default '',
`lnk_a1` enum('Yes','No') default 'No',
`lnk_a2` enum('Yes','No') default 'No',
`lnk_a3` enum('Yes','No') default 'No',
`lnk_a4` enum('Yes','No') default 'No',
`lnk_a5` enum('Yes','No') default 'No',
`lnk_a6` enum('Yes','No') default 'No',
`lnk_a7` enum('Yes','No') default 'No',
`lnk_a8` enum('Yes','No') default 'No',
`lnk_a9` enum('Yes','No') default 'No',
`lnk_a10` enum('Yes','No') default 'No',
`lnk_a11` enum('Yes','No') default 'No',
`lnk_a12` enum('Yes','No') default 'No',
`lnk_a13` enum('Yes','No') default 'No',
`lnk_a14` enum('Yes','No') default 'No',
`lnk_a15` enum('Yes','No') default 'No',
`lnk_a16` tinyint(127) NOT NULL default '1',
PRIMARY KEY (`lnk_id`),
UNIQUE KEY `lnk_id` (`lnk_id`)
) TYPE=InnoDB
It would also be v. helpful to know the best way to set up the 'advanced form' and the query/recordset i.e. the SQL Statement.
Hope you can help!?!