Blogs

Mysql Event Scheduler an alternative to cronjob.

January 31, 2014
Mysql introduce Event scheduler which we can use alternative to Cronjob. There are many advantages over cronjob like: 1) It is directly written on Mysql Server. 2) This is platform independent. Your application might be written in any language it does not matters. You just need to know mysql.
Read more..

PHP: Calculating Business days from given dates or for particular period.

January 29, 2014
PHP has numbers of datetime related functions which we can use to get Business day between two dates. Even if we have list of holidays we can also consider that for calculating. Here is a simple example how you will get Business day in a particular period:
Read more..

Different ways to find 2nd highest salary from employee table

December 15, 2013
Now a days i am conducting PHP / Mysql interview for my organisation. And came across many of resumes with 3-4 years of experience in web development. But couple of developer given me the correct answer to this question. That is what i think i should share this.
Read more..

My first experience with Codeigniter

August 10, 2013
Earlier, say 1.5 years back I have created a project in cakephp and my experience is good with CakePHP.Now when i try to create another project with cakePHP version 1.2 i am unable to do that. I unable to generate files from console it is giving me error regarding PHP that some of the functions ...
Read more..

Removing index.php from url of codeigniter in WAMP

August 10, 2013
Only three steps are require to remove index.php from url in Codeigniter in WAMP environment. 1) Create .htacess file in parallel to application holder and just copy past the following code:
Read more..

Mysql Query : Nth highest salary from employee table

August 10, 2013
You can write query in number of ways, but i list few of them which are easy to write and understand. Mysql having advantage of writing query with “limit”, by which you can handle start and end point.
Read more..

Example to use variable in Mysql

August 10, 2013
After a long time i used variable in SQL queries. This time i have to calculate time/days difference between added date of a particular news and current date, so that viewers get how old a particular news is.
Read more..

How Mysql reduce overhead from PHP!!!!!

August 10, 2013
I enjoy to play with Mysql queries. what i learn from my past experience is,if you are doing a maintainance project or you are handling a project which is developed by some other developer and he mess up with the database definitions, than you “WILL LEARN A LOT NEW THINGS”…………. How?
Read more..

HEREDoc in PHP

August 10, 2013
A way to delimit strings is the heredoc syntax:
Read more..

MySql Function Between.. AND in LEFT JOIN

August 10, 2013
If we are storing range of values in a field in a table and we want to see what are the values falling between these range, we can use “Between.. and” function along with Left Join in Mysql.
Read more..