I want to draw a line chart based upon the fetched data from the MySQL database table. I'm having users table with following fields:
user_id varchar(32)
user_first_name varchar(50)
user_reg_date bigint(12)
I'm storing the date in UNIX timestamp format, so taken the data type 'bigint
'.
Now I want to draw a line chart based upon the fetched data from the MySql database depending on specific criteria.
Suppose users_stats.php
is my PHP page on which I'm going to show the line chart using Google Charts tool. The URL of the page should be like this http://localhost/users_stats.php?to_date=1-6-2013&from_date=26-6-2013
.
Now I want to generate a query to fetch the no.of registered users between these two dates and want to show that data in Line Chart. I googled about this but only found examples having static data which is already set in the data array of Google Charts library. No example of line chart on dynamic data from database.
So would you help me in drawing this line chart depending upon the data received from the database? Thanks in Advance.