I have a answer table and a attribute table.
Answers table:
-----token-------question1a1-------question1a2-------question2------........
--aaaBBB324Cc---------Y----------------NULL--------------Y-----........
attribute table:
--------token---------attribute_1------....
------aaaBBB324Cc-----2012-08-13-------.....
With higcharts I am trying to display a graph with the total count for each question1(a1-a7) from a month back, with dates from the attribute table (namely the attribute_1 column)
this is not getting the desired results but here's my last attempt of maybe a hundred :)
$trackingquery1 = mysql_query("SELECT count(a.262697X1X1a1) as annonser,
count(a.262697X1X1a2) as adresserat,
UNIX_TIMESTAMP(t.attribute_1) as datum
FROM lime_survey_262697 a, attributetable t
WHERE a.262697X1X1a1 = 'Y' and a.262697X1X1a2 = 'Y' and t.attribute_1 > DATE_SUB(NOW(), INTERVAL 1 MONTH) group by(t.attribute_1) ORDER BY t.attribute_1 ASC");
if ($trackingquery1) {
while ($row1 = mysql_fetch_array($trackingquery1)) {
$dates .= "\n\t'". date("d-M-Y", strtotime($row1['datum'])) ."', ";
$annons .= "\n\t ".$row1['annonser'].",";
$addreserad .= "\n\t ".$row1['adresserat'].",";
}
I've hit a brick wall here and I've really tried to make it work but I don't know what to do now... :-/
Take care
Adishardis