DATABASE()
mysql> select DATABASE(); -> 'test'
USER()
SYSTEM_USER()
SESSION_USER()
mysql> select USER(); -> 'davida'
PASSWORD(String)
String. This
must be used to store a password in the 'user' grant table.
mysql> select PASSWORD('badpwd'); -> '7f84554057dd964b'
ENCRYPT(String[, Salt])
String with the unix crypt() command. The
Salt should be a string with 2 characters. If crypt() was
not found NULL will always be returned.
LAST_INSERT_ID()
mysql> select LAST_INSERT_ID(); -> 1
FORMAT(Nr, Num)
Nr to a Format like '#,###,###.##' with Num
decimals.
mysql> select FORMAT(12332.33, 2); -> '12,332.33'
VERSION
mysql> select version(); -> '3.21.16-beta-log'
GET_LOCK(String,timeout)
mysqladmin kill.
A lock is released if one executes RELEASE_LOCK, executes a new
GET_LOCK or if the thread ends. This function can be used to implement
application locks or simulate record locks.
mysql> select get_lock("automaticly released",10); -> 1
mysql> select get_lock("test",10); -> 1
mysql> select release_lock("test"); -> 1
mysql> select release_lock("automaticly released") -> NULL
RELEASE_LOCK(String)
GET_LOCK. Returns 1 if the
lock was released, 0 if lock wasn't locked by this thread and NULL if
the lock 'String' didn't exist.
Go to the first, previous, next, last section, table of contents.