Changeset 7424 for temp/trunk


Ignore:
Timestamp:
2006/11/06 09:54:45 (20 years ago)
Author:
kakinaka
Message:

* empty log message *

Location:
temp/trunk/data
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/data/downloads/module/mdl_epsilon.php

    r7423 r7424  
    6161    if(count($objPage->arrErr) == 0) { 
    6262         
     63        // ÈÆÍѹàÌܤòÄɲà
     64        sfAlterMemo(); 
     65         
    6366        // ÍøÍÑ¥³¥ó¥Ó¥Ë¤Ë¥Á¥§¥Ã¥¯¤¬Æþ¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢¥Ï¥¤¥Õ¥ó¶èÀÚ¤ê¤ËÊÔ½¸¤¹¤ë 
    6467        $convCnt = count($_POST["convenience"]); 
     
    7073        } 
    7174         
    72         sfprintr($convenience); 
     75        // DEL/INS¤ÇÅÐÏ¿¤¹¤ë¡£ 
     76        $delsql = "DELETE FROM dtb_payment"; 
    7377         
     78     
    7479        // javascript¼Â¹Ô 
    7580        //$objPage->tpl_onload = "window.close();"; 
  • temp/trunk/data/lib/slib.php

    r7180 r7424  
    6969                        relname"; 
    7070            $arrRet = $objQuery->getAll($sql, array($table_name)); 
     71            if(count($arrRet) > 0) { 
     72                return true; 
     73            } 
     74        }else if ($db_type == "mysql") { 
     75            $sql = "SHOW TABLE STATUS LIKE ?"; 
     76            $arrRet = $objQuery->getAll($sql, array($table_name)); 
     77            if(count($arrRet) > 0) { 
     78                return true; 
     79            } 
     80        } 
     81    } 
     82    return false; 
     83} 
     84 
     85// ¥«¥é¥à¤Î¸ºß¥Á¥§¥Ã¥¯ 
     86function sfColumnExists($table_name, $col_name, $dsn = "") { 
     87    if($dsn == "") { 
     88        if(defined('DEFAULT_DSN')) { 
     89            $dsn = DEFAULT_DSN; 
     90        } else { 
     91            return; 
     92        } 
     93    } 
     94     
     95    $objQuery = new SC_Query($dsn, true, true); 
     96    // Àµ¾ï¤ËÀܳ¤µ¤ì¤Æ¤¤¤ë¾ì¹ç 
     97    if(!$objQuery->isError()) { 
     98        list($db_type) = split(":", $dsn); 
     99        // postgresql¤Èmysql¤È¤Ç½èÍý¤òʬ¤±¤ë 
     100        if ($db_type == "pgsql") { 
     101            $sql = "SELECT 
     102                        a.attname 
     103                    FROM 
     104                        pg_class c, pg_attribute a 
     105                    WHERE 
     106                        c.relname=? AND 
     107                        a.attname=? AND 
     108                        c.oid=a.attrelid AND 
     109                        a.attnum > 0 
     110                    ORDER BY 
     111                        a.attnum"; 
     112            $arrRet = $objQuery->getAll($sql, array($table_name, $col_name)); 
    71113            if(count($arrRet) > 0) { 
    72114                return true; 
Note: See TracChangeset for help on using the changeset viewer.