Hi, here is the code. I however was hoping that you could give me some ideas on how I could find out myself what's wrong with a query when the prepareAndBind fails to create the $stmt object. Is there maybe something like a validation function that I could call which can indicate where there is an error in the query ?
public function setup()
// get input parameters
$NbrDays = request()->get('NbrDays');
$Agentid = request()->get('AgentId');
// build detailled datatable
'SELECT count(gtp_trip_id) as NbrTrips,
where date(created_at)> (date(now())-('.intval($NbrDays).'+1))
and agm_status = "done"
and agent_identifier like "'.$Agentid.'"
group by agent_identifier,customer_code,corporation_id,gtp_trip_id,date(created_at),agm_status,source_system;'
function($node) // build detailled listing
function($node) // build trip count list per day