Changeset 10299
- Timestamp:
- 2006/12/06 12:30:51 (20 years ago)
- Location:
- temp/trunk
- Files:
-
- 2 edited
-
data/lib/slib.php (modified) (2 diffs)
-
html/admin/products/index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/data/lib/slib.php
r10247 r10299 2524 2524 } 2525 2525 2526 2526 // SQL¥·¥ó¥°¥ë¥¯¥©¡¼¥ÈÂбþ 2527 2527 function sfQuoteSmart($in){ 2528 2528 … … 2566 2566 $changesql = eregi_replace("( RANDOM)", " RAND", $sql); 2567 2567 return $changesql; 2568 } 2569 2570 // view¤Îwhere¤òÃÖ´¹¤¹¤ë 2571 function sfViewWhere($target, $where = "", $arrval = array(), $option = ""){ 2572 global $arrViewWhere; 2573 $arrWhere = split("[?]", $where); 2574 $where_tmp = " WHERE " . $arrWhere[0]; 2575 for($i = 1; $i < count($arrWhere); $i++){ 2576 $where_tmp .= sfQuoteSmart($arrval[$i - 1]) . $arrWhere[$i]; 2577 } 2578 $arrViewWhere[$target] = $where_tmp . " " . $option; 2568 2579 } 2569 2580 -
temp/trunk/html/admin/products/index.php
r10295 r10299 279 279 280 280 // view¤â¹Ê¹þ¤ß¤ò¤«¤±¤ë(mysqlÍÑ) 281 global $arrViewWhere; 282 $arrWhere = split("[?]", $view_where); 283 $where_tmp = " WHERE " . $arrWhere[0]; 284 for($i = 1; $i < count($arrWhere); $i++){ 285 $where_tmp .= sfQuoteSmart($arrval[$i - 1]) . $arrWhere[$i]; 286 } 287 $arrViewWhere["&&noncls_where&&"] = $where_tmp . " " . $objQuery->order . " " . $objQuery->setlimitoffset($page_max, $startno, true); 288 281 sfViewWhere("&&noncls_where&&", $view_where, $arrval, $objQuery->order . " " . $objQuery->setlimitoffset($page_max, $startno, true)); 282 289 283 // ¸¡º÷·ë²Ì¤Î¼èÆÀ 290 284 $objPage->arrProducts = $objQuery->select($col, $from, $where, $arrval);
Note: See TracChangeset
for help on using the changeset viewer.
