Changeset 4722 for temp/trunk


Ignore:
Timestamp:
2006/09/14 14:37:52 (20 years ago)
Author:
kakinaka
Message:

blank

File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/html/admin/home.php

    r4721 r4722  
    8484     
    8585    if ( $method == 'SUM' or $method == 'COUNT'){ 
     86    // postgresql ¤È mysql ¤È¤ÇSQL¤ò¤ï¤±¤ë 
     87    if (DB_TYPE == "pgsql") { 
     88        $sql = "SELECT ".$method."(total) FROM dtb_order 
     89                 WHERE del_flg = 0 AND to_char(create_date,'YYYY/MM') = ?  
     90                 AND to_char(create_date,'YYYY/MM/DD') <> to_char(now(),'YYYY/MM/DD')"; 
     91    }else if (DB_TYPE == "mysql") { 
    8692        $sql = "SELECT ".$method."(total) FROM dtb_order 
    8793                 WHERE del_flg = 0 AND cast(substring(create_date,1,7) as date) = ?  
    8894                 AND cast(substring(create_date,1, 10) as date) <> cast(substring(now(),1, 10) as date)"; 
     95    } 
    8996        $return = $conn->getOne($sql, array($month)); 
    9097    } 
Note: See TracChangeset for help on using the changeset viewer.