return $fieldname;
}
+ /**
+ * Returns the SQL text to be used to calculate the length in characters of one expression.
+ * @param string fieldname or expression to calculate its length in characters.
+ * @return string the piece of SQL code to be used in the statement.
+ */
+ public function sql_length($fieldname) {
+ return ' LENGTH(' . $fieldname . ')';
+ }
+
/**
* Returns the proper substr() function for each DB.
* NOTE: this was originally returning only function name
return ' CONVERT(varchar, ' . $fieldname . ', ' . $numchars . ')';
}
+ /**
+ * Returns the SQL text to be used to calculate the length in characters of one expression.
+ * @param string fieldname or expression to calculate its length in characters.
+ * @return string the piece of SQL code to be used in the statement.
+ */
+ public function sql_length($fieldname) {
+ return ' LEN(' . $fieldname . ')';
+ }
+
/**
* Returns the SQL for returning searching one string for the location of another.
*/
return ' CAST(' . $fieldname . ' AS SIGNED) ';
}
+ /**
+ * Returns the SQL text to be used to calculate the length in characters of one expression.
+ * @param string fieldname or expression to calculate its length in characters.
+ * @return string the piece of SQL code to be used in the statement.
+ */
+ public function sql_length($fieldname) {
+ return ' CHAR_LENGTH(' . $fieldname . ')';
+ }
+
/**
* Does this driver suppoer regex syntax when searching
*/
return $this->insert_record_raw($table, $cleaned, false, true, true);
}
-}
\ No newline at end of file
+}
return "CONCAT_WS($separator, $s)";
}
+ /**
+ * Returns the SQL text to be used to calculate the length in characters of one expression.
+ * @param string fieldname or expression to calculate its length in characters.
+ * @return string the piece of SQL code to be used in the statement.
+ */
+ public function sql_length($fieldname) {
+ return ' CHAR_LENGTH(' . $fieldname . ')';
+ }
+
/**
* Does this driver suppoer regex syntax when searching
*/