-- -- Table structure for table `category`-- CREATE TABLE IF NOT EXISTS `category` (`id` int(11) NOT NULL AUTO_INCREMENT,`catpath` varchar(255) DEFAULT NULL,`name` varchar(255) DEFAULT NULL,PRIMARY KEY (`id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;-- -- Dumping data for table `category`-- INSERT INTO `category` (`id`, `catpath`, `name`) VALUES(1, '0', '网站首页'),(2, '0-1', 'Linux OS'),(3, '0-1', 'Apache服务器'),(4, '0-1', 'MySQL数据库'),(5, '0-1', 'PHP脚本语言'),(6, '0-1-2', 'Linux 系统教程'),(7, '0-1-2', 'Linux 网络技术'),(8, '0-1-2', 'Linux 安全基础'),(9, '0-1-2-7', 'Linux LAMP'),(10, '0-1-3-10', 'apache Server');
INSERT INTO `category` (`id`, (select concat(catpath,'-',id) as abspath from category order by abspath) as abspath, `name`) VALUES(44, '0-1-2-11', '网站首页');
INSERT INTO `category` (`id`, `catpath`, `name`) VALUES
(44, (select concat(catpath,'-',id) as abspath from category order by abspath) as abspath, '网站首页');
???
不知道想干什么,你的category表里并没有abspath字段。
是否写错,是这个字段catpath呢?
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号