No valid PHPLinq_ILinqProvider found for the specified data source.

Jul 14, 2010 at 6:24 PM

I'm trying to use PHPLinq for the first time but I'm getting the exception: 

No valid PHPLinq_ILinqProvider found for the specified data source.

Am I doing something wrong?

FYI,

/* site dir:
/index.php
/libraries/linq/
/libraries/linq/PHPLinq/
/libraries/linq/PHPLinq.php
*/
require_once(JPATH_SITE.DS.'libraries'.DS.'linq'.DS.'PHPLinq'.DS.'LinqToObjects.php'); $events = loadEventsList(); //returns an Array of (stdClass)$event $result = from('$event')->in('$events')->select('$event')->where('$event => $event->City == 10');

Coordinator
Jul 19, 2010 at 8:33 AM

Is this an array() or an ArrayObject? Can you try using the latest source code from the source code tab?

Sep 10, 2010 at 3:44 PM

That error happens when getting data not from an array, in your case this line '"  ->in('$events') "...

Try removing the single quotes around the  event variable. It will work, if that happens again, then your loadEventsList() is not returning a collection object..