$this->db->row("Sql语句");
代码示范:
<?php
$rs=$this->db->row("select id from cms_show where id=1 limit 1");
if($rs)
{
echo $rs['id'];
}
$this->db->load("Sql语句");
代码示范:
<?php
$rs=$this->db->load("select id from cms_show where isshow=1 limit 10");
if($rs)
{
foreach($rs as $key=>$val)
{
echo $val['id'];
}
}
$this->db->add("表名","数组");
代码示范:
<?php
$this->db->add("cms_show",['name'=>'姓名']);
#得到插入数据后的编号
$nid=$this->db->newid;
$this->db->update("表名","查询条件","数组");
代码示范:
<?php
$this->db->update("cms_show","id=10",['name'=>'姓名1']);
$this->db->del("表名","查询条件");
代码示范:
<?php
$this->db->del("cms_show","id=10");
$this->tp->add('abc','123');
$abc
的变量。$this->tp->show('模板所在路径');