Ignore:
Timestamp:
2006/09/25 11:26:56 (20 years ago)
Author:
kakinaka
Message:

blank

File:
1 edited

Legend:

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

    r5676 r5677  
    146146        if ($val != "dtb_bkup") { 
    147147            // ¥Æ¡¼¥Ö¥ë¹½À®¤ò¼èÆÀ 
    148             $arrColumnList = lfGetColumnList($val); 
     148            $arrAutoInc = lfGetAutoIncrement($val); 
    149149             
    150             sfprintr($arrColumnList); 
     150            sfprintr($arrAutoInc); 
    151151             
    152152            // Á´¥Ç¡¼¥¿¤ò¼èÆÀ 
     
    246246} 
    247247 
    248 // ¥Æ¡¼¥Ö¥ë¹½À®¤ò¼èÆÀ¤¹¤ë 
    249 function lfGetColumnList($table_name){ 
     248// ¼«Æ°ºÎÈÖ·¿Ãͤò¼èÆÀ¤¹¤ë 
     249function lfGetAutoIncrement($table_name){ 
    250250    $objQuery = new SC_Query(); 
    251251 
    252252    if(DB_TYPE == "pgsql"){ 
    253         $sql = "SELECT  
    254                     a.attname, t.typname, a.attnotnull, d.adsrc as defval, a.atttypmod, a.attnum as fldnum, e.description  
    255                 FROM  
    256                     pg_class c, 
    257                     pg_type t, 
    258                     pg_attribute a left join pg_attrdef d on (a.attrelid=d.adrelid and a.attnum=d.adnum) 
    259                                    left join pg_description e on (a.attrelid=e.objoid and a.attnum=e.objsubid) 
    260                 WHERE (c.relname=?) AND (c.oid=a.attrelid) AND (a.atttypid=t.oid) AND a.attnum > 0 
    261                 ORDER BY fldnum"; 
     253        $sql = "SELECT 
     254                    ci.relname, 
     255                    i.indkey 
     256                FROM 
     257                    pg_index i, 
     258                    pg_class c, 
     259                    pg_class ci 
     260                WHERE 
     261                    i.indrelid = c.oid AND 
     262                    i.indexrelid = ci.oid AND 
     263                    c.relname = ? 
     264                "; 
    262265        $arrRet = $objQuery->getAll($sql, array($table_name)); 
    263266    } 
    264267     
    265     return sfswaparray($arrRet); 
     268    return $arrRet; 
    266269 
    267270} 
Note: See TracChangeset for help on using the changeset viewer.