Changeset 1941 for temp/trunk


Ignore:
Timestamp:
2006/08/25 13:37:46 (20 years ago)
Author:
kakinaka
Message:

blank

File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/data/class/SC_SelectSql.php

    r1940 r1941  
    7373        $date1 = $from_year . "/" . $from_month . "/" . $from_day; 
    7474         
    75         // TO(TO¤Ï+1Æü) 
    76         $date2 = date("Y/m/d", strtotime(date('Y/m/d', $date1 . " + day")); 
     75        // TO 
     76        $date2 = $to_month . "/" . $to_day . "/" . $to_year; 
    7777         
    7878        sfprintr($date2); 
     
    8686        if( ( $from_year != "" ) && ( $from_month != "" ) && ( $from_day != "" ) &&  
    8787            ( $to_year != "" ) && ( $to_month != "" ) && ( $to_day != "" ) ) { 
    88             $this->setWhere( $column ." >= ? AND ". $column . " < ?" ); 
     88            $this->setWhere( $column ." >= " . $date1 ." AND ". $column . " < date(" . $date2 . ")+1" ); 
    8989            $return = array($date1, $date2); 
    9090        } 
     
    9292        // ½ªÎ»´ü´Ö¤À¤±»ØÄê¤Î¾ì¹ç 
    9393        if( ( $from_year == "" ) && ( $from_month == "" ) && ( $from_day == "" ) && ( $to_year != "" ) && ( $to_month != "" ) && ( $to_day != "" ) ) { 
    94             $this->setWhere( $column ." < ?" ); 
    95             $return = array($date2); 
     94            $this->setWhere( $column ." < date(" . $date2 . ")+1"); 
    9695        } 
    9796        return $return; 
Note: See TracChangeset for help on using the changeset viewer.