Hello folks,
I have the following SQL-Statement
[indent]
SELECT * FROM produkte WHERE produkte.id IN (SELECT pid FROM suche WHERE pname LIKE '%album%')
[/indent]
using PHP admin, it works fine.
For my whole project I use AR.
Now I thought, I can use AR in a simple way:
[indent]
$crit = new CDbCriteria();
$prod = new CProdukte(); // the model class
$crit->condition = "id IN (SELECT pid FROM suche WHERE pname LIKE '%album%'";
$rows = $prod->findAll($crit);
[/indent]
But the error code is:
[indent]
Attempt to assign property of non-object
[/indent]Ideas & discussion are welcome.
Scryii
[indent] [/indent]