flyerball10 Posted July 19, 2007 Share Posted July 19, 2007 I need to generate a query that shows the total of 'click' activity for the previous year up-to date group by the 'desination_url'. Here is an example. +---------------------+--------+---------+------+------------+------------+ | destination_url | July | June | May | April | March | +---------------------+--------+---------+------+------------+------------+ | www.yahoo.com | 15 | 15 | 12 | 9 | 12 | | www.phpfreaks.com | 23 | 33 | 10 | 7 | 10 | +---------------------+--------+---------+------+------------+------------+ Kind of like a cross tab query of some sort. Please help. I'm stuck Link to comment https://forums.phpfreaks.com/topic/60825-sql-query-help/ Share on other sites More sharing options...
jvrothjr Posted July 19, 2007 Share Posted July 19, 2007 $query2_command = "select count(*) from URL where Link = 'www.phpfreaks.com' and month = 'July'"; $CntRecordQuery = mysql_query($query2_command); $Cntvar=mysql_result($CntRecordQuery,0,"count(*)"); Link to comment https://forums.phpfreaks.com/topic/60825-sql-query-help/#findComment-302688 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.