原生sql语句执行

时间:2021-09-09 02:01:27
public function Text()
{
$nation = D("Nation");
$sqla = "select * from nation";
$qa = $nation->query($sqla);//查询是query()方法
$sqlb = "insert into nation values('n015','维族')";
$qb = $nation->execute($sqlb);//除了查询以外,都是execute()方法 }