信呼OA版本v2.3.8
This commit is contained in:
19
webmain/model/itemsModel.php
Normal file
19
webmain/model/itemsModel.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
//读取多行对应子表数据
|
||||
class itemsClassModel extends Model
|
||||
{
|
||||
public function getitemsdata($modeid, $table, $mid)
|
||||
{
|
||||
$subarr = $this->db->getall("SELECT iszb,GROUP_CONCAT(`fields`)`fields` FROM `[Q]flow_element` where mid='$modeid' and `iszb`>0 GROUP BY `iszb`");
|
||||
$arr = array();
|
||||
foreach($subarr as $k=>$rs){
|
||||
$xu = $rs['iszb']-1;
|
||||
$fields = $rs['fields'].',sort,id';
|
||||
$fields = str_replace(',','`,`', $fields);
|
||||
$fields = "`$fields`";
|
||||
$arr['subdata'.$xu.''] = $this->getrows("`table`='$table' and `mid`='$mid' and `valid`=1", $fields, '`sort`');
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user