jkersu

yep, I only selecting a foreign key column

jkersu

mmm... this seems to work $result = $sqlQuery->execute()->column();

jkersu

Yep so I think its because execute() return a Query which implements Iterator interface, so you can loop through it. Yep, so need to use SQLSelect for this particular use case

jkersu

Im using it to get a list of ids and then trying to pass those IDs to a filter()... then I get this:

jkersu

Mmmm.... it seems to be returning a query?

jkersu

Anyone know if there is another way for turning the results of an SQLSelect into an array, other than looping through the results and pushing them to a new array?

jkersu

Does SiteTree have to be namespaced @sutherlandesign? So like SilverStripe\CMS\Model\SiteTree ?

jkersu

Anyone know how I can retrieve a DataObject that's been archived? Would I have to compare records in the _live and _versions table?