Garry Taylor wrote:
> 
> "Sterin, Ilya" wrote:
> 
> Why would you want to do that.  Don't you already have that info when
> logging a user in?
> 
> Not necessarily, especially if you are in a function that is passed a
> $dbh to work with, and you've no control over how the programmer makes
> the connection in the first place.  You might not even know which type of
> database server it is connected to, though that is less usual.
> 
> Many (well, at least some) commercial databases provide mechanisms such
> as SELECT USERNAME or CURRENT_USER or some similar construct to allow you
> to identify the current user.
> 
>  > That's pretty much why I need to do this, unfortunatly I am using
> mySQL not Oracle.
>  > Anyway, if it's not possible, I'll just find a workaround.
MySQL is sometimes better than expected.
You can try  
"select User(), Database()" and "SHOW variables";

CU, Bernhard 
> 
> Thanks
> 
> Garry

-- 
*************************************************
Bernhard Schmalhofer
Software Engineer
Biomax Informatics AG
Lochhamer Str. 11
82152 Martinsried, Germany
Tel:    +49 89 89 55 74 - 39
Fax:    +49 89 89 55 74 - 25
mailto:[EMAIL PROTECTED]
http://www.biomax.de
*************************************************

Reply via email to