2508 Posts in 675 Topics by 520 members
Data Model Questions
SilverStripe Forums » Data Model Questions » get element where ID is different of, basic problem :/
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 946 Views |
-
get element where ID is different of, basic problem :/

16 June 2009 at 1:28am Last edited: 16 June 2009 1:29am
hi
i want to get random element where it ID is different of:
$doSet = DataObject::get(
$callerClass = "PlWycieczkaPage",
$filter = "ID != 17",
$sort = "RAND()",
$join = "",
$limit = 3
);
return $doSet;but i get:
Website Error
There has been an error
The website server has not been able to respond to your request. -
Re: get element where ID is different of, basic problem :/

16 June 2009 at 10:28am
no idea ?
i dont believe that i cant do negation in SQL -
Re: get element where ID is different of, basic problem :/

16 June 2009 at 5:18pm
Thats the standard error message. Use devmode to enable full debug / error messages
DataObject::get("PlWycieczkaPage", "`PlWycieczkaPage`.ID != '17'","RAND()",3);
| 946 Views | ||
|
Page:
1
|
Go to Top |


