代码如下 | 复制代码 |
<?php require_once (dirname ( __FILE__ ) . '/core/include/common.inc.php'); $dsql = "select * from dede_arctype where topid='0'"; $db->SetQuery ( $dsql ); $db->Execute (); $i = 1; while ( $row = $db->GetArray () ) { $dsql = "update dede_arctype set sortrank='{$i}' where id='{$row['id']}'"; if($db->ExecuteNoneQuery($dsql)){ echo "成功更新ID {$row['id']} {$row['typename']}={$row['sortrank']}<hr/>"; } else{ echo $dsql.'<hr/>'; } $i ++; } ?> |
时间: 2024-09-28 14:18:57