,ch04.13730 Page 181 Wednesday, November 29, 2000 4:43
,ch04.13730 Page 181 Wednesday, November 29, 2000 4:43 PM Table 4-8: MySQL-Supported Functions (continued) Function from_unixtime(unix_ timestamp) from_unixtime(unix_ timestamp,format) get_lock(str,timeout) greatest(X,Y,…) hex(N) interval(N,N1,N2,N3,…) hour(time) if(expr1,expr2,expr3) ifnull(expr1,expr2) isnull(expr) insert(str,pos,len,newstr) instr(str,substr) last_insert_id([expr]) lcase(str) lower(str) least(X,Y,…) left(str,len) length(str) octet_length(str) char_length(str) character_length(str) load_file(file_name) locate(substr,str) position(substr IN str) locate(substr,str,pos) Description 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. Returns a string representation of the unix_timestamp, formatted according to the format string. Format may contain the same specifiers as those listed in the entry for the DATE_ FORMAT( ) function. Tries to obtain a lock with a name given by the string str, with a timeout of timeout seconds. Returns 1 if the lock is obtained successfully, 0 if the attempt times out, or NULL if an error occurs. Returns the largest (maximum-valued) argument. Returns a string representation of the hexadecimal value of N, where N is a long (BIGINT ) number. This is equivalent to CONV(N,10,16). Returns NULL if N is NULL. Returns 0 if N < N1,1if N < N2, and so on. All arguments are treated as integers. It is required that N1 < N2 < N3 <... < Nn for this function to work correctly. Returns the hour for time, in the range 0 to 23. If expr1 is TRUE (expr1 <> 0 and expr1 <> NULL), then IF( ) returns expr2, else it returns expr3. IF( ) returns a numeric or string value, depending on the context in which it is used. If expr1 is not NULL, IFNULL( ) returns expr1; otherwise it returns expr2. IFNULL( ) returns a numeric or string value, depending on the context in which it is used. If expr is NULL, ISNULL( ) returns 1; otherwise it returns 0. Returns the string str. The substring begins at position pos and is 10 characters long, replaced by the string newstr. Returns the position of the first occurrence of substring substr in string str. Returns the last automatically generated value that was inserted into an AUTO_INCREMENT column. Returns the string str with all characters changed to lowercase according to the current character-set mapping (default is ISO-8859-1 Latin1). With two or more arguments, returns the smallest (minimumvalued) argument. Returns the leftmost len characters from the string str. These functions return the length of the string str. Reads the file and returns the file contents as a string. The file must be on the server, and the user must specify the full path- name to the file and have the file privilege. Returns the position of the first occurrence of substring substr in string str. Returns 0 if substr is not in str. Returns the position of the first occurrence of substring substr in string str, starting at position pos; returns 0 if substr is not in str. Functions Vendor Extensions 181
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP MySQL Web Hosting services