Tag: 自增预览模式: 普通 | 列表
10-05
13

dede 自增 autoindex

<ul>{dede:arclist row='6' titlelen='60' orderby='pubdate' typeid='1' idlist='' channelid='1'}
<li>
[field:global name=autoindex/]
[field:global name=autoindex runphp="yes"]@me=@me+5;[/field:global]
[field:global name=autoindex runphp="yes"](@me%2==0)? @me="|":@me="";[/field:global][field:textlink/]
[field:global name=autoindex runphp="yes"](@me!=8)? @me="|":@me="";[/field:global]

意思就是当autoindex等于8时候这个标签为空,否则为“|”。
</li>
{/dede:arclist}

查看更多...

Tags: 自增

分类:OpenSource | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 189
09-11
04

Field 'id' doesn't have a default value

昨天机子瘫了,重新装了一下。运行我hibernate工程,抛出一个异常:Field "id" doesn't have a default value。找了半天错误,原来是数据库中id字段没有设置为自增类型。原来我设成自增类型了,忘了记下来,结果耽误半天时间。也不错,记住了一个异常。呵呵。

查看更多...

Tags: MYSQL 自增

分类:Database | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 180
09-04
11

ASP程序自增

set rs = server.createobject("adodb.recordset")
'这里ProdId 是数据库里,你要做自增的字段
sql = "select * from bproduc where ProdId is not null"
rs.cursorlocation = 3
rs.open sql,conn,1,1
if rs.bof and rs.eof then'数据库没有数据,则设为1,暂时存到autoid
autoid=1
else
totalid=rs.RecordCount'有数据,根据数据库记录总数增1存到autoid

查看更多...

Tags: 自增

分类:Asp&Php | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 263