Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions

get element where ID is different of, basic problem :/


Reply

3 Posts   1212 Views

Avatar
snaip

16 June 2009 at 1:28am (Last edited: 16 June 2009 1:29am), Community Member, 180 Posts

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.

Avatar
snaip

16 June 2009 at 10:28am Community Member, 180 Posts

no idea ?
i dont believe that i cant do negation in SQL

Avatar
Willr

16 June 2009 at 5:18pm Forum Moderator, 5511 Posts

Thats the standard error message. Use devmode to enable full debug / error messages

DataObject::get("PlWycieczkaPage", "`PlWycieczkaPage`.ID != '17'","RAND()",3);