Blogs

How to access remote mysql server using local phpmyadmin

February 28, 2014
It is very tough to connect your remote mysql box especially when you are working with VPN. Initially I used telnet to connect to mysql box than I try to use workbench. Workbench is good and better than using telnet but again it consume more memory and if VPN got disconnected it just hanged. It ...
Read more..

Date manipulation with mysql..

February 10, 2014
There are various instance when we do date calculation on date / unix datetime fields.Following are some example as how to use inbuilt functions of mysql which will reduce doing calculation in PHP, I hope it will help someone:
Read more..

Maximum Number of Columns Per Table – Mysql

January 31, 2014
The maximum row size constrains the number of columns because the total width of all columns cannot exceed this size. For example, utf8 characters require up to three bytes per character, so for a CHAR(255) CHARACTER SET utf8 column,
Read more..

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..