Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[已答复] 求助:安装新的风格后,首页出现数据库错误!

[复制链接]
xyf168168 发表于 2009-10-10 17:14:23 | 显示全部楼层 |阅读模式
本帖最后由 玻璃屋女孩 于 2009-10-10 17:50 编辑

安装新的风格后首页出现问题
MySQL Error
Message: MySQL Query Error
SQL: SELECT a.uid,a.username,a.name,a.namestatus,b.uid,b.doid,b.message,b.dateline FROM uchome_space a, uchome_doing b where a.uid=b.uid and a.updatetime>'' and b.doid in (select max(doid) from uchome_doing b group by b.uid) ORDER BY b.dateline DESC LIMIT 0,3
Error: You have an error in your SQL syntax near 'select max(doid) from uchome_doing b group by b.uid) ORDER BY b.dateline DESC LI' at line 1
Errno.: 1064



其他页面都能正常显示,就是首页出现数据库错误,这是什么问题呀??   请求大家帮忙
回复

使用道具 举报

玻璃屋女孩 发表于 2009-10-10 17:43:56 | 显示全部楼层
你在哪里下载的新风格?SQL语有问题
回复

使用道具 举报

云天一 发表于 2009-10-10 17:45:20 | 显示全部楼层
你的mysql是哪个版本的

你的那个报错的sql我在我的机子上测试了一下可以查出数据来

你可以尝试进phpmyadmin里面运行一下那个sql语句
回复

使用道具 举报

 楼主| xyf168168 发表于 2009-10-10 18:13:16 | 显示全部楼层
本帖最后由 xyf168168 于 2009-10-10 18:14 编辑

我是运行aimi的那个友情链接的插件--city_install.php
这是那个代码文件,这哪里问题呀
<?php
include_once('./common.php');

if(file_exists('./data/city_install.lock')) showmessage('您已经安装过了,若要重新安装,请先删除data/city_install.lock!', 'index.php', 3);

$charset = str_replace('-', '', $_SC['charset']);
$extend = $_SGLOBAL['db']->version() > '4.1' ? " DEFAULT CHARSET={$charset} " : "";

$sql[] = "ALTER TABLE `uchome_spacefield` ADD `birthsubcity` VARCHAR( 20 ) NOT NULL default '' AFTER `birthcity`";
$sql[] = "ALTER TABLE `uchome_spacefield` ADD `residesubcity` VARCHAR( 20 ) NOT NULL default '' AFTER `residecity`";
$sql[] = "ALTER TABLE `uchome_event` ADD `subcity` VARCHAR( 20 ) NOT NULL default '' AFTER `city`";
$sql[] = "ALTER TABLE `uchome_mtag` ADD `resideprovince` VARCHAR( 20 ) NOT NULL default '' AFTER `fieldid`";
$sql[] = "ALTER TABLE `uchome_mtag` ADD `residecity` VARCHAR( 20 ) NOT NULL default '' AFTER `fieldid`";

foreach($sql as $val){
        $_SC['tablepre'] != 'uchome_' && $val = str_replace("`uchome_", '`'. $_SC['tablepre'], $val);
        $_SGLOBAL['db']->query($val);
}

swritefile('data/city_install.lock', $_SERVER['REQUEST_TIME']);
showmessage('恭喜你,安装成功!接下来更新缓存就可以了', 'admincp.php', 2);

?>




我选择重新升级,说“字段重复”!
回复

使用道具 举报

 楼主| xyf168168 发表于 2009-10-11 14:41:43 | 显示全部楼层
((em:07)) ((em:07))
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-13 05:02 , Processed in 0.099771 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表