MySQL Forums
Forum List  »  Newbie

Re: USER() function returns hostname
Posted by: Felix Geerinckx
Date: July 20, 2005 12:33PM

D Green wrote:

> Can anyone tell me how to return the username of the currently logged in user without the
> hostname included.

select substr(user(), 1, locate('@',user())-1);

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject
Written By
Posted
Re: USER() function returns hostname
July 20, 2005 12:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.