Hello!
I am trying to retrieve information from database using this:
public function setup() {
$this->src('table')
->query("
SELECT video.title, a.videoid, SUM(a.end_player-a.seekto)
FROM a
INNER JOIN video ON video.videoid = a.videoid
WHERE a.videoid IN ( SELECT videoid
FROM video
WHERE category=CONCAT('#', :courseid, '#')
GROUP BY a.videoid;
")
->params(array(
':courseid'=>$this->params["id"],
))
->pipe($this->dataStore('result1'));
}
}
It seems that koolreport get broken if parameter is passed in nested select clause because for example
" ... WHERE category = '#100#' ..."
seems to be working just fine.
How do I solve this problem?