MySQL vs MongoDB (NoSQL) database MongoDB vs MySQL: Comparison Between Relational and Document Oriented Database Both are used for storing the data and free to use that is both comes under open-sources software. MongoDB might be unfamiliar at least to some of us as it is a relatively new compared to other established databases…
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 …
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)…
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…
Prevent gaps/holes in a MySQL table AUTO_INCREMENT Primary Key field. Generally during the MySQL database development you create tables with a Primary Key, a very simple way to create a primary key is make it Auto-increment and unsigned integer with Not Null property right? I think most of you generally follow the above…
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…