Пример #1
0
 /**
  * Method used to escape a string before using it in a query.
  *
  * @param   string|array $input The original string
  * @return  string|array The escaped (or not) string
  * @deprecated Using this is bad design, must use placeholders in query
  */
 public static function escapeString($input, $add_quotes = false)
 {
     if (is_array($input)) {
         foreach ($input as $key => $value) {
             $input[$key] = self::escapeString($value, $add_quotes);
         }
     } else {
         $input = DB_Helper::escapeString($input, $add_quotes);
     }
     return $input;
 }