To get data from MySQL is a base for PHP programming.
First we create a table in XAMPP:
CREATE TABLE income
(
username VARCHAR(20) NOT NULL,
income_type CHAR(1) NOT NULL,
income DECIMAL(18,2)NOT NULL
) ENGINE = MYISAM;
Then insert some data:
INSERT INTO income(username,income_type,income) VALUES
('j1','A','2000.0' ),
('j2','B','2050.5' ),
('j3','A', '300.0'),
('j4','B', '400.0');
Now we fetch this 2d array data using PHP functions: mysql_connect, mysql_select_db and mysql_fetch_assoc
More about this code:
http://jiansenlu.blogspot.ca/2013/05/...