Changeset 5678
- Timestamp:
- 2006/09/25 12:00:24 (20 years ago)
- File:
-
- 1 edited
-
temp/trunk/html/admin/system/bkup.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/html/admin/system/bkup.php
r5677 r5678 145 145 146 146 if ($val != "dtb_bkup") { 147 // ¥Æ¡¼¥Ö¥ë¹½À®¤ò¼èÆÀ148 $arrAutoInc = lfGetAutoIncrement($val);149 147 150 sfprintr($arrAutoInc); 148 // ¼«Æ°ºÎÈÖ·¿¤Î¹½À®¤ò¼èÆÀ¤¹¤ë 149 $csv_autoinc = lfGetAutoIncrement($val); 150 151 //sfprintr($csv_autoinc); 151 152 152 153 // Á´¥Ç¡¼¥¿¤ò¼èÆÀ … … 246 247 } 247 248 248 // ¼«Æ°ºÎÈÖ·¿ Ãͤò¼èÆÀ¤¹¤ë249 // ¼«Æ°ºÎÈÖ·¿¤òCSV½ÐÎÏ·Á¼°¤ËÊÑ´¹¤¹¤ë 249 250 function lfGetAutoIncrement($table_name){ 251 $arrColList = lfGetColumnList($table_name); 252 253 sfprintr($arrColList); 254 255 } 256 257 // ¥Æ¡¼¥Ö¥ë¹½À®¤ò¼èÆÀ¤¹¤ë 258 function lfGetColumnList($table_name){ 259 $objQuery = new SC_Query(); 260 261 if(DB_TYPE == "pgsql"){ 262 $sql = "SELECT 263 a.attname, t.typname, a.attnotnull, d.adsrc as defval, a.atttypmod, a.attnum as fldnum, e.description 264 FROM 265 pg_class c, 266 pg_type t, 267 pg_attribute a left join pg_attrdef d on (a.attrelid=d.adrelid and a.attnum=d.adnum) 268 left join pg_description e on (a.attrelid=e.objoid and a.attnum=e.objsubid) 269 WHERE (c.relname=?) AND (c.oid=a.attrelid) AND (a.atttypid=t.oid) AND a.attnum > 0 270 ORDER BY fldnum"; 271 $arrRet = $objQuery->getAll($sql, array($table_name)); 272 } 273 274 return sfSwapArray($arrRet); 275 } 276 277 // ¼«Æ°ºÎÈÖ·¿¤ÎÃͤò¼èÆÀ¤¹¤ë 278 function lfGetAutoIncrementVal($table_name){ 250 279 $objQuery = new SC_Query(); 251 280 … … 265 294 $arrRet = $objQuery->getAll($sql, array($table_name)); 266 295 } 267 268 296 return $arrRet; 269 270 297 } 271 298
Note: See TracChangeset
for help on using the changeset viewer.
