Hey guys,
We've created a class which extends page called DetailPropertyPage. It just has loads of extra frields and some one-to-many relationships to Images and DataObjects.
I'm writting a custom search function at the moment to return matching DataObjects.
Here is my code:
$properties = DataObject::get('DetailPropertyPage', $queryString, '`DetailPropertyPage`.`Price` ASC', '', '0, 30');
I know that $queryString is correct because if I paste it into phpMyAdmin then I get results but it always turns up NULL in SilverStripe. Am I using the wrong caller class?
Just in case it is useful, heres the typical contents for $queryString:
`DetailPropertyPage`.`Status`='S' and `DetailPropertyPage`.`PropertyType`='Terraced' and `DetailPropertyPage`.`Bedrooms`>=1 and `DetailPropertyPage`.`Price`>=50000 and `DetailPropertyPage`.`Price`<=150000
Thanks,
Robbie