$sql = $this->method('tables');
if ($sql and !empty($this->conn)) {
+ # Filters
+ $type = self::p('table-type',''); $type = $type ? explode(',',$type) : $type;
+ $name = self::p('table-name',''); $name = $name ? explode(',',$name) : $name;
+
foreach ($this->conn->query($sql,PDO::FETCH_ASSOC) as $row) {
- $name = current($row);
+ $tname = current($row);
+
+ # Filters
+ if (!empty($name) and !$this->str_match($row['name'],$name)) continue;
+ if (!empty($type) and !$this->str_match($row['type'],$type)) continue;
# add to this->tables !!!
- $t = $this->table($name,$row+['status'=>$row]);
+ $t = $this->table($tname,$row+['status'=>$row]);
}
}