CREATE TABLE cat (
id INT(10) not null auto_increment,
catName varchar(100) not null,
catDesc varchar(255) not null,
catKeywords varchar(255) not null,
primary key(id)
);
CREATE TABLE listing (
id INT(10) NOT NULL AUTO_INCREMENT,
cat_id int(10) not null,
title VARCHAR(200) not null,
url varchar(255) not null,
description text not null,
primary key(id)
);
CREATE TABLE temp (
id INT(10) NOT NULL AUTO_INCREMENT,
cat_id int(10) not null,
title VARCHAR(200) not null,
url varchar(255) not null,
description text not null,
primary key(id)
);
create table vote (
id INT(10) NOT NULL AUTO_INCREMENT,
user_ip varchar(50) not null,
voter varchar(20) not null,
title VARCHAR(200) not null,
vote int not null,
rated_id int(10) not null,
date timestamp,
comment varchar(255) not null,
primary key(id)
);
insert into cat(catName, catDesc, catKeywords) values("Web design","Web design is a collection of website that offer web design service","web design directory, top web design service");
insert into cat(catName, catDesc, catKeywords) values("Script Directory","This category offer you a list of the best scripting directory","script, free script");
insert into cat(catName, catDesc, catKeywords) values("Web hosting","Check out for the best web hosting service on the net which are voted by members around the world","web hosting");
insert into cat(catName, catDesc, catKeywords) values("Domain name","Check out for the best domain name registrar on the net which are voted by members around the world","domain name");
insert into cat(catName, catDesc, catKeywords) values("Tutorial","Check out for the best website that offer tutorial","web design tutorial, programming tutorial");
insert into cat(catName, catDesc, catKeywords) values("Web Tools","Web site that offer web based web tools","Webmaster tools, web tools");
