Changeset 5462 for temp/trunk/html


Ignore:
Timestamp:
2006/09/23 16:28:56 (20 years ago)
Author:
kakinaka
Message:

blank

File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/html/admin/system/bkup.php

    r5461 r5462  
    8383    $arrTableList = lfGetTableList(); 
    8484     
    85     sfprintr($arrTableList); 
    86      
    87     // ¥Æ¡¼¥Ö¥ë¾ðÊó¤ò 
     85    // ³Æ¥Æ¡¼¥Ö¥ë¾ðÊó¤ò¼èÆÀ¤¹¤ë 
     86    foreach($arrTableList as $key => $val){ 
     87         
     88        // ¥Æ¡¼¥Ö¥ë¹½À®¤ò¼èÆÀ 
     89        $arrColumnList = lfGetColumnList($val); 
     90         
     91         
     92        sfprintr($arrColumnList); 
     93         
     94         
     95         
     96        // Á´¥Ç¡¼¥¿¤ò¼èÆÀ 
     97         
     98         
     99    } 
    88100     
    89101     
     
    109121} 
    110122 
    111  
     123// ¥Æ¡¼¥Ö¥ë¹½À®¤ò¼èÆÀ¤¹¤ë 
     124function lfGetColumnList($table_name){ 
     125    $objQuery = new SC_Query(); 
     126 
     127    if(DB_TYPE == "pgsql"){ 
     128        $sql = "SELECT  
     129                    a.attname, t.typname, a.attnotnull, d.adsrc as defval, a.atttypmod, a.attnum as fldnum, e.description  
     130                FROM  
     131                    pg_class c, 
     132                    pg_type t, 
     133                    pg_attribute a left join pg_attrdef d on (a.attrelid=d.adrelid and a.attnum=d.adnum) 
     134                                   left join pg_description e on (a.attrelid=e.objoid and a.attnum=e.objsubid) 
     135                WHERE (c.relname=?) AND (c.oid=a.attrelid) AND (a.atttypid=t.oid) AND a.attnum > 0 
     136                ORDER BY fldnum"; 
     137        $arrRet = $objQuery->getAll($sql, array($table_name)); 
     138    } 
     139 
     140} 
    112141 
    113142 
Note: See TracChangeset for help on using the changeset viewer.