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 /

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba

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


Go to End
Reply


3 Posts   1309 Views

Avatar
snaip

Community Member, 180 Posts

16 June 2009 at 1:28am

Edited: 16/06/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.

Avatar
snaip

Community Member, 180 Posts

16 June 2009 at 10:28am

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

Avatar
Willr

Forum Moderator, 5517 Posts

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);