コード例 #1
0
ファイル: params.php プロジェクト: Gimcrack/aimsys
 function __construct($table = '', $col = '')
 {
     if ($table != '' and $col != '') {
         $select = "SHOW FULL COLUMNS FROM `{$table}` WHERE `field` LIKE '{$col}'";
         $result = parent::_query($select);
         $comment = $result[0]['Comment'];
         $comment = explode('||', $comment);
         $ii = 0;
         foreach ($this as $key => $value) {
             $this->{$key} = $comment[$ii];
             $ii++;
         }
         $this->input_name = $col;
     }
 }