AnsweredAssumed Answered

ExecuteSQL?????

Question asked by weedonpaul on Nov 21, 2015
Latest reply on Nov 22, 2015 by okramis

What is wrong with the following:

 

ExecuteSQL("SELECT publication_month FROM Coverage WHERE _kf_clients_id = ? AND publication_date >=? AND publication_date <=? GROUP BY publication_month";"";""; Coverage_Report::_kf_clients_id; Coverage_Report::start_date; Coverage_Report::end_date)

 

ExecuteSQL("SELECT SUM(count) FROM Coverage WHERE _kf_clients_id = ? AND publication_date >=? AND publication_date <=? GROUP BY publication_month";"";""; Coverage_Report::_kf_clients_id; Coverage_Report::start_date; Coverage_Report::end_date)

 

both of these send back a ?

 

the top one is to get x-axis tables in a bar graph

 

the bottom is to sum up a field called count that has the number 1 in it (there is a better way I know but I don't think thats the problem) to count the frequency of coverage in a month.

 

I should add that I pinched this code from an example that was kindly sent to me to solve another problem and I (hesitate to the use the word) tweaked it.

Outcomes