3093 Posts in 875 Topics by 654 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 271 Views |
-
DataObject::get() returns NULL when no records are found?

16 January 2012 at 10:35am Last edited: 17 January 2012 12:42am
Hi everyone,
I'm not sure I fully understand all the inners of DataObject yet, but I'm surprised to see that executing DataObject::get() with a filter that returns no record returns nothing, rather than an empty DataObjectSet. Is this normal?
Example:
// assuming that the database contains no record which Date > CURDATE()
$news_articles = DataObject::get("NewsArticle", "Date > CURDATE()");
return $news_articles; // This returns NULL.Thanks for your help!
| 271 Views | ||
|
Page:
1
|
Go to Top |

