- 主题:[smthblog]批账号Column count doesn't match value count at r
前面有laserboy说是老问题
由于列数不同产生的
可是我不清除到底怎么改
用的是smth1.2
mysql 4.0
导入的是 doc里的那个sql
--
FROM 220.168.69.*
发信人: laserboy (光速小子), 信区: BBSMan_Dev
标 题: Re: smth的blog的管理是通过什么方式?
发信站: BBS 水木清华站 (Wed Aug 4 13:28:36 2004), 转信
老问题了,开始建立的SQL数据库的列数和建立BBS语句中插入数据库的语句
列数不一致。对照修改其中的一个就可以了。
【 在 leojn (假的) 的大作中提到: 】
: 安装完blog,在telnet下添加个人文集,在选择建立,输入y后,显示错误
: Column count doesn't match value count at row 1
: 求教
: ...................
这个就是没看懂
而且我web下的管理打不开
pcconf里面设置了是SYSOP的管理员
不过说我无权访问该页
【 在 cnbird (阿七) 的大作中提到: 】
: 前面有laserboy说是老问题
: 由于列数不同产生的
: 可是我不清除到底怎么改
: ...................
--
FROM 220.168.69.*
这个原因是因为 tenlet 下给用户开个人文集中所使用的SQL语句和mysql数据库中的数据表中的字段数目不一致的缘故。
数据表为:users 表
打开 $bbssrc/src/libpc.c 文件,大概709行,改为
if (pn->uid <= 0)
sprintf(sql, "INSERT INTO users VALUES (NULL, '%s', '%s', '%s', 'others', %d, %d, '%s', 0 ,NULL,0,0,NULL,'%s' , '' , 0 , 600
, 5 , '' , 0 , '%s' , '' , 0 , 0 , '' );", pn->username, newcorp,
newdesc, pn->nodelimit, pn->dirlimit, tt2timestamp(pn->createtime, newts), tt2timestamp(pn->createtime, newts), tt2t
imestamp(pn->createtime, newts));
else
主要就是中间的SQL语句的修改。注意最后一个对最后一个字段赋值为 空 ""
【 在 cnbird (阿七) 的大作中提到: 】
: 发信人: laserboy (光速小子), 信区: BBSMan_Dev
: 标 题: Re: smth的blog的管理是通过什么方式?
: 发信站: BBS 水木清华站 (Wed Aug 4 13:28:36 2004), 转信
: ...................
--
FROM 219.216.80.*
oh... god , 打包里头这个SQL语句好老了亚
这个是CVS里头的
sprintf(sql,"INSERT INTO `users` ( `uid` , `username` , `corpusname` , `description` , `theme` , `nodelimit` , `dirlimit` , `createtime` , `style` , `backimage` , `visitcount` , `nodescount` , `logoimage` , `modifytime` , `links` , `htmleditor` , `indexnodechars` , `indexnodes` , `useremail` , `favmode` , `updatetime` , `userinfor` , `pctype` ,`defaulttopic`) VALUES ('', '%s', '%s', '%s' , 'others', %d, %d, NOW( ) , '0', '' , '0', '0', '' , NOW( ) , '', '1', '600', '5', '', '0', NOW( ) , '' , '0' , '其他类别');",pn->username, newcorp, newdesc, pn->nodelimit, pn->dirlimit );
else
【 在 wuweixin (有颜色的猫) 的大作中提到: 】
: 这个原因是因为 tenlet 下给用户开个人文集中所使用的SQL语句和mysql数据库中的数据表中的字段数目不一致的缘故。
: 数据表为:users 表
: 打开 $bbssrc/src/libpc.c 文件,大概709行,改为
: ...................
--
FROM 61.149.113.*
欧 \\谢谢
【 在 wuweixin (有颜色的猫) 的大作中提到: 】
: 这个原因是因为 tenlet 下给用户开个人文集中所使用的SQL语句和mysql数据库中的数据表中的字段数目不一致的缘故。
: 数据表为:users 表
: 打开 $bbssrc/src/libpc.c 文件,大概709行,改为
: ...................
--
FROM 220.168.69.*
CVS里面的数据库和打包的应该不一样吧?
放进去也不好用的。
【 在 windinsn (雪域清风) 的大作中提到: 】
: oh... god , 打包里头这个SQL语句好老了亚
: 这个是CVS里头的
: sprintf(sql,"INSERT INTO `users` ( `uid` , `username` , `corpusname` , `description` , `theme` , `nodelimit` , `dirlimit` , `createtime` , `style` , `backimage` , `visitcount` , `nodescount` , `logoimage` , `modifytime` , `links` , `htmleditor` , `in
: ...................
--
FROM 219.216.80.*