Month: July 2019

MySQL: DATE vs DATETIME vs TIMESTAMP

Many times while working with MySQL date-time column, one confusion or question come to our mind and that's,       Which data type should I use DATETIME or TIMESTAMP, as both stores the same data? First, Let's take a look over all three date-related data types available in MySQL - DATE : Value: Having … Continue reading MySQL: DATE vs DATETIME vs TIMESTAMP

MySQL: DateTime; How to? Questions and Answers

In day to day working, Many times I'm used to google for many MySQL date-time related functions/queries. below are some of them and many more will be added to these in future. Please comments, if anyone has a better way for any of the HOW questions? and If anyone has any additional question, ask in … Continue reading MySQL: DateTime; How to? Questions and Answers

JavaScript: Automatically Logout from all Open Tabs When User Logout in One of them

In a web application, When the user opens the application in multiple tabs and then log out from one of them, Current tab refreshed and shows the Login page. But what about other open tabs? Open tabs still showing last opened page, because those tabs don't know if User session terminated or not. In this … Continue reading JavaScript: Automatically Logout from all Open Tabs When User Logout in One of them

JQuery : Allow only English Language in Website/Application

If you want to restrict your application users or web site visitors to type only English words, like in contact form of your web-site, You can use below shortcode which allows the user only to enter numbers, English alphabets and special chars. $(document).ready(function(){      $(document).on("keypress", function (event){         var key = … Continue reading JQuery : Allow only English Language in Website/Application