<{if $newid}> 插入一行数据,新增的uid是:<{$newid}> <{else}> 插入数据失败! <{/if}>

代码:

// 准备数据,一个“字段名”对应“值”的数组
$data = array(
	"username" => "user".mt_rand(2,100),
);
$user = new User();
// create返回的是最新插入的自增主键的值
$this->newid = $user->create($data);
<{include file="db/inner.html"}>

返回到main/index