Month: April 2019

JavaScript: Do and Don’t

JavaScript (JS) is simple high-level, the interpreted scripting language of the web applications. In the past last several years, many powerful JavaScript-based libraries, frameworks and some of even server-side JavaScript platforms developed. Currently, there is a huge crowd who is working on JavaScript and search for best practices. So here I just try to summaries … Continue reading JavaScript: Do and Don’t

CakePHP 2.x: Internationalization, client wise PO files for a single language

"CakePHP makes building web applications simpler, faster while requiring less code." We are working on one large ERP application using CakePHP and having internationalization. We have multiple clients for the same application and every client have their own requests for the naming convention for the labels. We were searching in google for many days and … Continue reading CakePHP 2.x: Internationalization, client wise PO files for a single language

CakePHP 2.x: How to log out / terminate the session when user close browser

Many developers may search for this functionality. When the user closed all tabs of application or close browser and again try to hit our application URL in the browser, We want to logout that User. The browser maintains user session whenever there are cookies related to session and cookies not expired on browser close if … Continue reading CakePHP 2.x: How to log out / terminate the session when user close browser

MySQL: Difference between Stored Procedure and Function

We all know the basic difference in Store procedure (SP) and function Store Procedure - Pre-compile which compiled once and executes whenever it is called. Functions - Compiled and executes every-time whenever it is called. Along with this, SP and Function has some other differences, described bellow - The function must return a single value … Continue reading MySQL: Difference between Stored Procedure and Function

JavaScript : An invalid form control with name=” is not focusable (Chrome)

Many of us may encounter with this issue and the Chrome browser also not shows any other details where the exact issue. To Resolve this I were Google and found a solution, and feel I have to share details - Reason : Chrome tries to focus on a control which is required but empty during … Continue reading JavaScript : An invalid form control with name=” is not focusable (Chrome)

MySql – Commit, Rollback and Exception

To perform Transaction [Commit and Rollback] in MySQL, we must have to declare EXIT HANDLER. There are two types - SQLEXCEPTION: execute when an exception occurred SQLWARNING: execute when warning occurred DELIMITER $$DROP PROCEDURE IF EXISTS `mydb`.`DEMO_SP`$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `DEMO_SP`() BEGIN DECLARE v_ID BIGINT(20) DEFAULT NULL; ----- Other variable, cursor declarations -- SQL Exception … Continue reading MySql – Commit, Rollback and Exception