Code: Select all
if($_GET['w'] === 'overall') {
// $x = |2004|2005|2006|2007|2008|2009 etc..
// $y = some manually things
// $v1 = <number of hits for 2004 (from db1)>, <number of hits for 2005 (from db1)> etc..
// $v2 = <number of hits for 2004 (from db2)>, <number of hits for 2005 (from db2)> etc..
} elseif($_GET['w'] === 'year') {
$year = $_GET['y'];
// $x = |January|February|Mars etc.. (only for the given month($year))
// $y = some manually things
// $v1 = <number of hits for January $year (from db1)>, <number of hits for February $year (from db1)> etc..
// $v2 = <number of hits for January $year (from db2)>, <number of hits for February $year (from db2)> etc..
} elseif($_GET['w'] === 'month') {
$month = $_GET['m'];
// $x = |2004|2005|2006|2007|2008|2009 etc.. (only for the given month($month))
// $y = some manually things
// $v1 = <number of hits for 2004 $month (from db1)>, <number of hits for 2005 $month (from db1)> etc..
// $v2 = <number of hits for 2004 $month (from db2)>, <number of hits for 2005 $month (from db2)> etc..
} else {
echo 'Select something!';
}
?>
<img alt="" src="http://chart.apis.google.com/chart?chs=800x300&cht=lc&chxl=0:|<?php echo $x; ?>|1:|<?php echo $y; ?>&chd=t:<?php echo $v1; ?>|<?php echo $v2; ?>3&chds=0,99&chxr=0,0,99&chco=6090C0,008800&chg=14.28,16.66,1,5&chdl=<?php //blabla ?>&chxt=x,y" />- first year, last year
- list years and the number of rows per year
- first month, last month
- list months and the number of rows per months
.. And the same for weeks/days
Thanks for any help.