MySQL Interview Questions & Answers
MySQL interview questions for experienced MySQL query for finding max and second max and nth max salary for a employee table using MySQL Suppose you have a table ’employee’ given as below —————————— | EmpId        |    Salary      | | 2                  |    2000        | | 3      …

Automatic session timeout/logout using PHP after X Minutes of Inactivity/Idle time
PHP Automatic Session Expire after X Minutes of Inactivity/Idle time  Automatic session timeout/logout using php   Session timeout is a notion and the only way you make you sure that no session ever will survive after X minutes of inactivity. Session timeout or Session expire depends on the server configuration or the relevant directives (session.gc_maxlifetime)…

PHP Traits
One of the problem of PHP as a OOP language is, the fact that you can only have single inheritance. This means your class can only inherit from one other class.   PHP Traits (new feature was added in PHP 5.4) is kind of like a Mixin, allows you to mix Trait classes into an…

PHP short_open_tag = On should not be used
After a fresh installation you could find that PHP short_open_tag disabled by default in php.ini file.   You can check by using phpinfo() PHP function. Under PHP Core setting you can find as below   Directive Local Value Master Value short_open_tag Off Off   If “short_open_tag” is found off in your php.ini file then you…