Changeset 10287 for temp/trunk
- Timestamp:
- 2006/12/06 12:07:07 (20 years ago)
- File:
-
- 1 edited
-
temp/trunk/html/admin/products/index.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/html/admin/products/index.php
r10279 r10287 121 121 122 122 $where = "del_flg = 0"; 123 123 $view_where = "del_flg = 0"; 124 124 125 // ÆþÎÏ¥¨¥é¡¼¤Ê¤· 125 126 if (count($objPage->arrErr) == 0) { … … 136 137 case 'search_product_id': // ¾¦ÉÊID 137 138 $where .= " AND product_id = ?"; 139 $view_where .= " AND product_id = ?"; 138 140 $arrval[] = $val; 139 141 break; … … 142 144 $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE classcategory_id1 IN " . $where_in; 143 145 $where .= " OR classcategory_id2 IN" . $where_in . ")"; 146 $view_where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE classcategory_id1 IN " . $where_in; 147 $view_where .= " OR classcategory_id2 IN" . $where_in . ")"; 144 148 $arrval[] = "%$val%"; 145 149 $arrval[] = "%$val%"; 150 $view_where = $where; 146 151 break; 147 152 case 'search_name': // ¾¦ÉÊ̾ 148 153 $where .= " AND name ILIKE ?"; 154 $view_where .= " AND name ILIKE ?"; 149 155 $arrval[] = "%$val%"; 150 156 break; … … 153 159 if($tmp_where != "") { 154 160 $where.= " AND $tmp_where"; 161 $view_where.= " AND $tmp_where"; 155 162 $arrval = array_merge((array)$arrval, (array)$tmp_arrval); 156 163 } … … 158 165 case 'search_product_code': // ¾¦ÉÊ¥³¡¼¥É 159 166 $where .= " AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? GROUP BY product_id)"; 167 $view_where .= " AND EXISTS (SELECT product_id FROM dtb_products_class as cls WHERE cls.product_code ILIKE ? AND prd.product_id = cls.product_id GROUP BY cls.product_id )"; 160 168 $arrval[] = "%$val%"; 161 169 break; … … 163 171 $date = sfGetTimestamp($_POST['search_startyear'], $_POST['search_startmonth'], $_POST['search_startday']); 164 172 $where.= " AND update_date >= '" . $_POST['search_startyear'] . "/" . $_POST['search_startmonth']. "/" .$_POST['search_startday'] . "'"; 173 $view_where.= " AND update_date >= '" . $_POST['search_startyear'] . "/" . $_POST['search_startmonth']. "/" .$_POST['search_startday'] . "'"; 165 174 break; 166 175 case 'search_endyear': // ÅÐÏ¿¹¹¿·Æü¡ÊTO¡Ë … … 168 177 $date = date('Y/m/d', strtotime($date) + 86400); 169 178 $where.= " AND update_date < date('" . $date . "')"; 179 $view_where.= " AND update_date < date('" . $date . "')"; 170 180 break; 171 181 case 'search_product_flag': //¼ïÊÌ … … 174 184 if($search_product_flag != "") { 175 185 $where.= " AND product_flag LIKE ?"; 186 $view_where.= " AND product_flag LIKE ?"; 176 187 $arrval[] = $search_product_flag; 177 188 } … … 192 203 $tmp_where.=")"; 193 204 $where.= " $tmp_where"; 205 $view_where.= " $tmp_where"; 194 206 } 195 207 break; … … 234 246 235 247 // ¹Ô¿ô¤Î¼èÆÀ 236 //$linemax = $objQuery->count("dtb_products", $where, $arrval);248 $linemax = $objQuery->count("dtb_products as prd", $view_where, $arrval); 237 249 $objPage->tpl_linemax = $linemax; // ²¿·ï¤¬³ºÅö¤·¤Þ¤·¤¿¡£É½¼¨ÍÑ 238 250 … … 273 285 $where_tmp .= sfQuoteSmart($arrval[$i - 1]) . $arrWhere[$i]; 274 286 } 287 $where_tmp .= $view_where; 275 288 $arrViewWhere["&&noncls_where&&"] = $where_tmp . " " . $objQuery->order . " " . $objQuery->setlimitoffset($page_max, $startno, true); 276 289 */
Note: See TracChangeset
for help on using the changeset viewer.
