数据库建表 外键
CREATE TABLE `job_lis` ( `id` int(11) NOT NULL AUTO_INCREMENT, `jobs_name` varchar(255) DEFAULT NULL, `jobs_href` varchar(255) DEFAULT NULL, `company` varchar(255) DEFAULT NULL, `company_url` varchar(255) DEFAULT NULL, `company_addr` varchar(255) DEFAULT NULL, `salarys` varchar(255) DEFAULT NULL, `time_date` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=710 DEFAULT CHARSET=utf8;
CREATE TABLE `jobcontent` ( `id` int(11) NOT NULL AUTO_INCREMENT, `content` text, `job_lis_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `job_lis_id` (`job_lis_id`), CONSTRAINT `jobcontent_ibfk_1` FOREIGN KEY (`job_lis_id`) REFERENCES `job_lis` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;