"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "function.txt" of archive mysqlfront_1.22.zip:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 #
    2 # MySQL-Function-list: used by MySQL-Front on opening a connection.
    3 #
    4 # you can add or delete entrys as you want - perhaps you want only
    5 # a few of them shown in the functions-Popup-Menu
    6 #
    7 # One or more spaces as first character recognizes the entry as sub-item
    8 # A - represents a seperator
    9 # A | (pipe) indicates that a comment follows
   10 #
   11 Comparison
   12   GREATEST(X,Y,...)|Returns the largest (maximum-valued) argument. The arguments are compared using the same rules as for LEAST.
   13   IF(expr1,expr2,expr3)|If expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then IF() returns expr2, else it returns expr3
   14   IFNULL(expr1,expr2)|If expr1 is not NULL, IFNULL() returns expr1, else it returns expr2.
   15   INTERVAL(N,N1,N2,N3,...)|Returns 0 if N < N1, 1 if N < N2 and so on.
   16   ISNULL(expr)|If expr is NULL, ISNULL() returns 1, otherwise it returns 0.
   17   LEAST(X,Y,...)|With two or more arguments, returns the smallest (minimum-valued) argument.
   18   NULLIF(expr1,expr2)|If expr1 = expr2 is true, return NULL else return expr1.
   19   STRCMP(expr1,expr2)|returns 0 if the strings are the same, -1 if the first argument is smaller than the second according to the current sort order, and 1 otherwise.
   20 Math
   21   ABS(X)|Returns the absolute value of X.
   22   ACOS(X)|Returns the arc cosine of X, that is, the value whose cosine is X. Returns NULL if X is not in the range -1 to 1.
   23   ASIN(X)|Returns the arc sine of X, that is, the value whose sine is X. Returns NULL if X is not in the range -1 to 1.
   24   ATAN(X)|Returns the arc tangent of X, that is, the value whose tangent is X.
   25   ATAN2(X,Y)|Returns the arc tangent of the two variables X and Y. It is similar to calculating the arc tangent of Y / X, except that the signs of both arguments are used to determine the quadrant of the result.
   26   CEILING(X)|Returns the smallest integer value not less than X.
   27   COS(X)|Returns the cosine of X, where X is given in radians.
   28   COT(X)|Returns the cotangent of X.
   29   DEGREES(X)|Returns the argument X, converted from radians to degrees.
   30   EXP(X)|Returns the value of e (the base of natural logarithms) raised to the power of X.
   31   FLOOR(X)|Returns the largest integer value not greater than X.
   32   LOG(X)|Returns the natural logarithm of X.
   33   LOG10(X)|Returns the base-10 logarithm of X.
   34   MOD(N,M)|Modulo (like the % operator in C). Returns the remainder of N divided by M.
   35   PI()|Returns the value of PI.
   36   POW(X,Y)|Returns the value of X raised to the power of Y.
   37   POWER(X,Y)|Returns the value of X raised to the power of Y.
   38   RADIANS(X)|Returns the argument X, converted from degrees to radians.
   39   RAND(N)|Returns a random floating-point value in the range 0 to 1.0. If an integer argument N is specified, it is used as the seed value.
   40   ROUND(X,D)|Returns the argument X, rounded to a number with D decimals. If D is 0, the result will have no decimal point. 
   41   SIGN(X)|Returns the sign of the argument as -1, 0 or 1, depending on whether X is negative, zero, or positive.
   42   SIN(X)|Returns the sine of X, where X is given in radians.
   43   SQRT(X)|Returns the non-negative square root of X.
   44   TAN(X)|Returns the tangent of X, where X is given in radians.
   45   TRUNCATE(X,D)|Returns the number X, truncated to D decimals. If D is 0, the result will have no decimal point or fractional part.
   46 String
   47   ASCII(str)|Returns the ASCII code value of the leftmost character of the string str. Returns 0 if str is the empty string. Returns NULL if str is NULL.
   48   BIN(N)|Returns a string representation of the binary value of N, where N is a longlong (BIGINT) number.
   49   CHAR(N,...)|interprets the arguments as integers and returns a string consisting of the characters given by the ASCII code values of those integers.
   50   CHARACTER_LENGTH(str)|Returns the length of the string str.
   51   CHAR_LENGTH(str)|Returns the length of the string str.
   52   COALESCE(list)|Returns first non-NULL element in list.
   53   CONCAT(str1,str2,...)|Returns the string that results from concatenating the arguments.
   54   CONCAT_WS(separator, str1, str2,...)|stands for CONCAT With Separator and is a special form of CONCAT(). The first argument is the separator for the rest of the arguments
   55   CONV(N,from_base,to_base)|Converts numbers between different number bases. Returns a string representation of the number N, converted from base from_base to base to_base.
   56   ELT(N,str1,str2,str3,...)|Returns str1 if N = 1, str2 if N = 2, and so on. Returns NULL if N is less than 1 or greater than the number of arguments. ELT() is the complement of FIELD().
   57   EXPORT_SET(bits,on,off,[separator,[number_of_bits]])|Returns a string where for every bit set in "bit", you get a "on" string and for every reset bit you get an "off" string. Each string is separated with "separator" (default ",") and only "number_of_bits" (default 64) of "bits" is used.
   58   FIELD(str,str1,str2,str3,...)|Returns the index of str in the str1, str2, str3, ... list. Returns 0 if str is not found. FIELD() is the complement of ELT().
   59   FIND_IN_SET(str,strlist)|Returns a value 1 to N if the string str is in the list strlist consisting of N substrings. A string list is a string composed of substrings separated by "," characters.
   60   FORMAT(X,D)|Formats the number X to a format like "#,###,###.##", rounded to D decimals. If D is 0, the result will have no decimal point or fractional part.
   61   HEX(N)|Returns a string representation of the hexadecimal value of N, where N is a longlong (BIGINT) number.
   62   INSERT(str,pos,len,newstr)|Returns the string str, with the substring beginning at position pos and len characters long replaced by the string newstr.
   63   INSTR(str,substr)|Returns the position of the first occurrence of substring substr in string str
   64   LCASE(str)|Returns the string str with all characters changed to lowercase according to the current character set mapping (the default is ISO-8859-1 Latin1).
   65   LEFT(str,len)|Returns the leftmost len characters from the string str.
   66   LENGTH(str)|Returns the length of the string str.
   67   LOCATE(substr,str,pos)|Returns the position of the first occurrence of substring substr in string str, starting at position pos.
   68   LOWER(str)|Returns the string str with all characters changed to lowercase according to the current character set mapping (the default is ISO-8859-1 Latin1).
   69   LPAD(str,len,padstr)|Returns the string str, left-padded with the string padstr until str is len characters long.
   70   LTRIM(str)|Returns the string str with leading space characters removed.
   71   MAKE_SET(bits,str1,str2,...)|Returns a set (a string containing substrings separated by "," characters) consisting of the strings that have the corresponding bit in bits set. str1 corresponds to bit 0, str2 to bit 1, etc. NULL strings in str1, str2, ... are not appended to the result.
   72   MID(str,pos,len)|Returns a substring len characters long from string str, starting at position pos.
   73   OCT(N)|Returns a string representation of the octal value of N, where N is a longlong number.
   74   OCTET_LENGTH(str)|Returns the length of the string str.
   75   ORD(str)|If the leftmost character of the string str is a multi-byte character, returns the code of multi-byte character by returning the ASCII code value of the character
   76   POSITION(substr IN str)|Returns the position of the first occurrence of substring substr in string str.
   77   REPEAT(str,count)|Returns a string consisting of the string str repeated count times. If count <= 0, returns an empty string.
   78   REPLACE(str,from_str,to_str)|Returns the string str with all all occurrences of the string from_str replaced by the string to_str.
   79   REVERSE(str)|Returns the string str with the order of the characters reversed.
   80   RIGHT(str,len)|Returns the rightmost len characters from the string str.
   81   RPAD(str,len,padstr)|Returns the string str, right-padded with the string padstr until str is len characters long.
   82   RTRIM(str)|Returns the string str with trailing space characters removed.
   83   SOUNDEX(str)|Returns a soundex string from str. Two strings that sound "about the same" should have identical soundex strings.
   84   SPACE(N)|Returns a string consisting of N space characters.
   85   SUBSTRING(str,pos,len)|Returns a substring len characters long from string str, starting at position pos.
   86   SUBSTRING_INDEX(str,delim,count)|Returns the substring from string str before count occurrences of the delimiter delim.
   87   TRIM([[BOTH | LEADING | TRAILING] [remstr] FROM] str)|Returns the string str with all remstr prefixes and/or suffixes removed. If none of the specifiers BOTH, LEADING or TRAILING are given, BOTH is assumed.
   88   UCASE(str)|Returns the string str with all characters changed to uppercase according to the current character set mapping (the default is ISO-8859-1 Latin1).
   89   UPPER(str)|Returns the string str with all characters changed to uppercase according to the current character set mapping (the default is ISO-8859-1 Latin1).
   90 Date and Time
   91   ADDDATE(date,INTERVAL expr type)|Performs date arithmetic.
   92   CURDATE()|Returns today's date as a value in "YYYY-MM-DD" or YYYYMMDD format, depending on whether the function is used in a string or numeric context.
   93   CURTIME()|Returns the current time as a value in "HH:MM:SS" or HHMMSS format, depending on whether the function is used in a string or numeric context.
   94   DATE_ADD(date,INTERVAL expr type)|Performs date arithmetic.
   95   DATE_FORMAT(date,format)|Formats the date value according to the format string.
   96   DATE_SUB(date,INTERVAL expr type)|Performs date arithmetic.
   97   DAYNAME(date)|Returns the name of the weekday for date.
   98   DAYOFMONTH(date)|Returns the day of the month for date, in the range 1 to 31.
   99   DAYOFWEEK(date)|Returns the weekday index for date (1 = Sunday, 2 = Monday, ... 7 = Saturday). These index values correspond to the ODBC standard.
  100   DAYOFYEAR(date)|Returns the day of the year for date, in the range 1 to 366.
  101   EXTRACT
  102   FROM_DAYS(N)|Given a daynumber N, returns a DATE value.
  103   FROM_UNIXTIME(unix_timestamp,format)|Returns a representation of the unix_timestamp argument as a value in "YYYY-MM-DD HH:MM:SS" or YYYYMMDDHHMMSS format, depending on whether the function is used in a string or numeric context.
  104   HOUR(time)|Returns the hour for time, in the range 0 to 23.
  105   MINUTE(time)|Returns the minute for time, in the range 0 to 59.
  106   MONTH(date)|Returns the month for date, in the range 1 to 12.
  107   MONTHNAME(date)|Returns the name of the month for date.
  108   NOW()|Returns the current date and time as a value in "YYYY-MM-DD HH:MM:SS" or YYYYMMDDHHMMSS format, depending on whether the function is used in a string or numeric context.
  109   PERIOD_ADD(P,N)|Adds N months to period P (in the format YYMM or YYYYMM). Returns a value in the format YYYYMM.
  110   PERIOD_DIFF(P1,P2)|Returns the number of months between periods P1 and P2. P1 and P2 should be in the format YYMM or YYYYMM.
  111   QUARTER(date)|Returns the quarter of the year for date, in the range 1 to 4.
  112   SECOND(time)|Returns the minute for time, in the range 0 to 59.
  113   SEC_TO_TIME(seconds)|Returns the seconds argument, converted to hours, minutes and seconds, as a value in "HH:MM:SS" or HHMMSS format, depending on whether the function is used in a string or numeric context.
  114   SUBDATE(date,INTERVAL expr type)|Performs date arithmetic.
  115   SYSDATE()|Returns the current date and time as a value in "YYYY-MM-DD HH:MM:SS" or YYYYMMDDHHMMSS format, depending on whether the function is used in a string or numeric context.
  116   TIME_FORMAT(time,format)|This is used like the DATE_FORMAT() function above, but the format string may contain only those format specifiers that handle hours, minutes and seconds.
  117   TIME_TO_SEC(time)|Returns the time argument, converted to seconds.
  118   TO_DAYS(date)|Given a date date, returns a daynumber (the number of days since year 0).
  119   UNIX_TIMESTAMP(date)|If called with no argument, returns a Unix timestamp (seconds since "1970-01-01 00:00:00" GMT). If UNIX_TIMESTAMP() is called with a date argument, it returns the value of the argument as seconds since "1970-01-01 00:00:00" GMT.
  120   WEEK(date)|With a single argument, returns the week for date, in the range 0 to 53
  121   WEEKDAY(date)|Returns the weekday index for date (0 = Monday, 1 = Tuesday, ... 6 = Sunday).
  122   YEAR(date)|Returns the year for date, in the range 1000 to 9999.
  123   YEARWEEK(date,first)|Returns year and week for a date. The second arguments works exactly like the second argument to WEEK().
  124 Summarizing
  125   AVG(expr)|Returns the average value of expr.
  126   BIT_AND(expr)|Returns the bitwise AND of all bits in expr. The calculation is performed with 64-bit (BIGINT precision).
  127   BIT_OR(expr)|Returns the bitwise OR of all bits in expr. The calculation is performed with 64-bit (BIGINT precision).
  128   COUNT(expr)|Returns a count of the number of non-NULL values in the rows retrieved by a SELECT statement.
  129   MAX(expr)|Returns the maximum value of expr. May take a string argument; in such cases it returns the maximum string value.
  130   MIN(expr)|Returns the minimum value of expr. May take a string argument; in such cases it returns the minimum string value.
  131   STD(expr)|Returns the standard deviation of expr. This is an extension to ANSI SQL. The STDDEV() form of this function is provided for Oracle compatability.
  132   STDDEV(expr)|Returns the standard deviation of expr. This is an extension to ANSI SQL. The STDDEV() form of this function is provided for Oracle compatability.
  133   SUM(expr)|Returns the sum of expr. Note that if the return set has no rows, it returns NULL!
  134 Miscellaneous
  135   BENCHMARK(count,expr)|Executes the expression expr repeatedly count times. It may be used to time how fast MySQL processes the expression.
  136   BIT_COUNT(N)|Returns the number of bits that are set in the argument N.
  137   CONNECTION_ID()|Returns the connection id (thread_id) for the connection. Every connection has its own unique id.
  138   DATABASE()|Returns the current database name.
  139   DECODE(crypt_str,pass_str)|Descrypts the encrypted string crypt_str using pass_str as the password. crypt_str should be a string returned from ENCODE().
  140   ENCODE(str,pass_str)|Encrypt str using pass_str as the password. To decrypt the result, use DECODE(). The results is a binary string of the same length as string. If you want to save it in a column, use a BLOB column type.
  141   ENCRYPT(str[,salt])|Encrypt str using the Unix crypt() system call. The salt argument should be a string with two characters. (As of MySQL 3.22.16, salt may be longer than two characters.)
  142   GET_LOCK(str,timeout)|Tries to obtain a lock with a name given by the string str, with a timeout of timeout seconds. Returns 1 if the lock was obtained successfully, 0 if the attempt timed out, or NULL if an error occurred (such as running out of memory or the thread was killed with mysqladmin kill).
  143   INET_NTOA(expr)|Returns the network address (4 or 8 byte) for the numeric expression.
  144   INET_ATON(expr)|Returns an integer that represents the numeric value for a network address Addresses may be 4 or 8 byte addresses.
  145   LAST_INSERT_ID([expr])|Returns the last automatically generated value that was inserted into an AUTO_INCREMENT column.
  146   LOAD_FILE(file_name)|Reads the file and returns the file contents as a string. The file must be on the server, you must specify the full pathname to the file, and you must have the file privilege.
  147   MD5(string)|Calculates a MD5 checksum for the string. Value is returned as a 32 long hex number that may, for example, be used as a hash key.
  148   PASSWORD(str)|Calculates a password string from the plaintext password str. This is the function that is used for encrypting MySQL passwords for storage in the Password column of the user grant table.
  149   RELEASE_LOCK(str)|Releases the lock named by the string str that was obtained with GET_LOCK(). Returns 1 if the lock was released, 0 if the lock wasn't locked by this thread (in which case the lock is not released) and NULL if the named lock didn't exist.
  150   SESSION_USER()|Returns the current MySQL user name.
  151   SYSTEM_USER()|Returns the current MySQL user name.
  152   USER()|Returns the current MySQL user name.
  153   VERSION()|Returns a string indicating the MySQL server version.