Changeset 10240 for temp/trunk


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

Legend:

Unmodified
Added
Removed
  • temp/trunk/data/lib/slib.php

    r10225 r10240  
    25242524} 
    25252525 
     2526 
     2527function sfQuoteSmart($in){ 
     2528    if (is_int($in) || is_double($in)) { 
     2529        return $in; 
     2530    } elseif (is_bool($in)) { 
     2531        return $in ? 1 : 0; 
     2532    } elseif (is_null($in)) { 
     2533        return 'NULL'; 
     2534    } else { 
     2535        return "'" . str_replace("'", "''", $in) . "'"; 
     2536    } 
     2537} 
     2538     
    25262539// viewɽ¤ò¥¤¥ó¥é¥¤¥ó¥Ó¥å¡¼¤ËÊÑ´¹¤¹¤ë 
    25272540function sfChangeView($sql){ 
  • temp/trunk/html/admin/products/index.php

    r10239 r10240  
    272272            $arrWhere = split("[?]", $where); 
    273273            sfprintr($arrWhere); 
     274             
     275            $where_tmp = ""; 
     276            foreach($arrWhere as $key => $val){ 
     277                $where_tmp .= $val . sfQuoteSmart($arrval[$key]); 
     278            } 
     279             
     280            sfprintr($where_tmp); 
    274281             
    275282             
Note: See TracChangeset for help on using the changeset viewer.