Changeset 10259 for temp


Ignore:
Timestamp:
2006/12/06 09:22:14 (20 years ago)
Author:
kaki
Message:
 
Location:
temp/trunk
Files:
2 edited

Legend:

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

    r7999 r10259  
    121121    } 
    122122     
    123     function setlimitoffset($limit, $offset = 0) { 
     123    function setlimitoffset($limit, $offset = 0, $return = false) { 
    124124        if (is_numeric($limit) && is_numeric($offset)){ 
    125             $this->option.= " LIMIT " . $limit; 
    126             $this->option.= " OFFSET " . $offset; 
     125             
     126            $option.= " LIMIT " . $limit; 
     127            $option.= " OFFSET " . $offset; 
     128             
     129            if($return){ 
     130                return $option; 
     131            }else{ 
     132                $this->option.= $option; 
     133            } 
    127134        } 
    128135    } 
  • temp/trunk/html/admin/products/index.php

    r10258 r10259  
    262262 
    263263            // ¼èÆÀÈϰϤλØÄê(³«»Ï¹ÔÈֹ桢¹Ô¿ô¤Î¥»¥Ã¥È) 
    264             $objQuery->setlimitoffset($page_max, $startno); 
     264            //$objQuery->setlimitoffset($page_max, $startno); 
    265265            // ɽ¼¨½ç½ø 
    266266            $objQuery->setorder($order); 
     
    275275                $where_tmp .= sfQuoteSmart($arrval[$i - 1]) . $arrWhere[$i]; 
    276276            } 
    277             $arrViewWhere["&&noncls_where&&"] = $where_tmp . " " . $objQuery->order . " " .  $objQuery->option;  
     277            $arrViewWhere["&&noncls_where&&"] = $where_tmp . " " . $objQuery->order . " " .  $objQuery->setlimitoffset($page_max, $startno, true); 
    278278             
    279279            sfprintr($objQuery->option); 
Note: See TracChangeset for help on using the changeset viewer.