返回给数组的写法:
$query3 = $this->db->query("select * from constrproj where ConstrProjID= ( SELECT min(ConstrProjID) from constrproj)");
$arr = $query3->result_array();$ParentID = $arr[0]['ConstrProjID']; (操作键值。 因为它是二维数组,所以这么写)
返回给对象的写法:
$query3 = $this->db->query("select * from constrproj where ConstrProjID= ( SELECT min(ConstrProjID) from constrproj)");
$arr = $query3->result();
$ConstrProjID = $v->ConstrProjID; (操作属性)
}