Category: Mysql

How to create a Google Charts from PHP with MySQL Database

How to create a Google Charts from PHP with MySQL Database


If you need to display some sort of statistics on your website, it would be beautiful if you represent it with charts. It may be difficult to create those charts on your own. But, Google provides visualization api that makes it easy to create google charts from MySQL database using php. Basic Setup to Generate … Continue reading How to create a Google Charts from PHP with MySQL Database

How to use Join Query in CodeIgniter – Examples

How to use Join Query in CodeIgniter – Examples


CodeIgniter Join Query Example JOIN Queries (or JOIN Statements) are used to combine data from two or more database tables using a common field name. There are different types of joins available based upon the way they pull off the data from the db. For better understanding I go by example. Sample Database Tables Consider … Continue reading How to use Join Query in CodeIgniter – Examples

What is difference between MYISAM and InnoDB?


The difference between MYISAM and INNODB. MYISAM: 1. MYISAM supports Table-level Locking 2. MyISAM designed for need of speed 3. MyISAM does not support foreign keys hence we call MySQL with MYISAM is DBMS 4. MyISAM stores its tables, data and indexes in diskspace using separate three different files. (tablename.FRM, tablename.MYD, tablename.MYI) 5. MYISAM not … Continue reading What is difference between MYISAM and InnoDB?

How to Get the second highest salary from employee table in mysql


We have get the second, third, fourth etc. hightest salary from the employee table very easily in mysql/sql. Getting max highest salary: SELECT max(salary) as salary FROM employee; Getting N th highest salary syntax: SELECT salary FROM employee as emp WHERE (n-1) = (SELECT count(*) FROM employee as emp2 WHERE emp2.salary > emp.salary) Getting 2nd … Continue reading How to Get the second highest salary from employee table in mysql