Thursday, 19 March 2015

Disable facebook notification popup after Click on Facebook Like Button

I use following code to show the "Facebook Like Button" in my Web Page.

Added following code in Header
<div id="fb-root"> </div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>

Added Following code where "show the Facebook Like Button"

<div class="fb-like" data-action="like" data-href="http://www.web-technology-experts-notes.in/2011/12/facebook-social-plugin.html" data-layout="standard" data-share="false" data-show-faces="true" style="height: 19px; overflow: hidden;"> </div>


When Someone click on "Facebook Like Button" It shows the following popup.  See Below:
Disable facebook notification popup after Click on Facebook Like Button



Now, I want to disable this facebook popup. Means, If someone click on "Facebook Like Button" I must not show the Popup.

Solution:
Replace the Following code

<div class="fb-like" data-action="like" data-href="http://www.web-technology-experts-notes.in/2011/12/facebook-social-plugin.html" data-layout="standard" data-share="false" data-show-faces="true"> </div> With <div class="fb-like" data-action="like" data-href="http://www.web-technology-experts-notes.in/2011/12/facebook-social-plugin.html" data-layout="standard" data-share="false" data-show-faces="true" style="height: 19px; overflow: hidden;"> </div>

Note: you can increase/decrease the height as per design.

Wednesday, 18 March 2015

How to get a list of MySQL user accounts?

How to get a list of MySQL user accounts?

In MySQL, you can get list of user account with user details. Just execute following Query of PHPMySQL/SQL Yog/Other MySQL Tools.

List of MySQL users.
SELECT User FROM mysql.user


List of MySQL unique users.
select distinct User from mysql.user;

List of MySQL users with password and host.
SELECT Host,User, Password FROM mysql.user


List of MySQL unique Users with password and host.
SELECT Host,User, Password FROM mysql.user  group by User



List of MySQL users with all permissions.
SELECT * FROM mysql.user WHERE 1