Thanks!<br><br>Can you also please tell me which variable stores the name for currently used "phpmyadmin" database?  <br><br clear="all">--------------------------------------------------<br>Best regards,<br>Zeeshan Mughal<br>
Email:  <a href="mailto:zeeshanmughal@ieee.org">zeeshanmughal@ieee.org</a><br>Web:  <a href="http://www.zixan.info">http://www.zixan.info</a><br>
<br><br><div class="gmail_quote">On Wed, Jul 15, 2009 at 3:43 AM, Michal Čihař <span dir="ltr"><<a href="mailto:michal@cihar.com">michal@cihar.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br>
<br>
Dne Wed, 15 Jul 2009 01:45:36 -0400<br>
Zeeshan Mughal <<a href="mailto:zeeshanmughal@ieee.org">zeeshanmughal@ieee.org</a>> napsal(a):<br>
<div class="im"><br>
> Hi, I am using the following code to extract currently logged user name from<br>
> PMA_DBI_fetch_value('SELECT USER();')<br>
><br>
> //        $userAndHost = PMA_DBI_fetch_value('SELECT USER();');<br>
> //        $userAndHost = str_split($userAndHost);<br>
> //        while ($i=0 < count($userAndHost)-1) {<br>
> //            $username += $userAndHost[$i];<br>
> //            $i++;<br>
> //            if ($userAndHost[$i] == "@") {<br>
> //                break;<br>
> //            }<br>
<br>
</div>Going chars one by one is not a good idea. How about just explode('@',<br>
$userAndHost)[0]?<br>
<br>
But anyway current user is available as<br>
$GLOBALS['cfg']['Server']['user'] without need for any parsing and<br>
querying MySQL.<br>
<font color="#888888"><br>
--<br>
        Michal Čihař | <a href="http://cihar.com" target="_blank">http://cihar.com</a> | <a href="http://phpmyadmin.cz" target="_blank">http://phpmyadmin.cz</a><br>
</font><br>------------------------------------------------------------------------------<br>
Enter the BlackBerry Developer Challenge<br>
This is your chance to win up to $100,000 in prizes! For a limited time,<br>
vendors submitting new applications to BlackBerry App World(TM) will have<br>
the opportunity to enter the BlackBerry Developer Challenge. See full prize<br>
details at: <a href="http://p.sf.net/sfu/Challenge" target="_blank">http://p.sf.net/sfu/Challenge</a><br>_______________________________________________<br>
Phpmyadmin-devel mailing list<br>
<a href="mailto:Phpmyadmin-devel@lists.sourceforge.net">Phpmyadmin-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
<br></blockquote></div><br>