1842 Posts in 1600 Topics by 558 members
|Go to End|
13 February 2013 at 10:00pm Last edited: 13 February 2013 10:24pm
This sounds like something to do with versioning.
There may not be an entry in BlogEntry_Live with ID 739, but that is because the IDs of the *_Live tables aren't 1-1 with the IDs in the draft tables. Instead, RecordID is used in the *_Live tables.
Versioning should take care of this for you with your DO::get() queries, so, is the blog post you're trying to filter published?
If it isn't, publish it or view the site as draft mode.
If it is, then try BlogEntry.RecordID != xxx
If that still isn't working, make sure your site is in 'dev' mode, then add a 'die;' imediately after the DO::get() that isn't working and add '?showqueries' to the end of the url, this will print out all the SQL queries that are run. Then copy the LAST query on the page, save it into a txt file and upload it as an attachment with the next post you leave here.
14 February 2013 at 3:52pm
now its working..
what i did is i concatenate the ID into the URL. $link?blogid=$ID
return FeedAggregator::posts_by_sport($sportHolder,10, $_GET['blogid']);
and using this query
$posts = DataObject::get('BlogEntry','ParentID IN('.$idList.') AND "BlogEntry".ID != '. (int) $postID,'Date DESC','',$limit);
thank you guys!
|Go to Top|