# \[SOLVED\] Contain results in ambiguouty

**URL:** <https://discourse.cakephp.org/t/solved-contain-results-in-ambiguouty/5070>\
**Category:** Need Help\
**Created:** [October 8, 2018, 10:44am UTC](https://discourse.cakephp.org/t/solved-contain-results-in-ambiguouty/5070 "2018-10-08T10:44:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FinlayDaG33k](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/finlaydag33k/32/1049_2.png) [@FinlayDaG33k](https://discourse.cakephp.org/u/FinlayDaG33k)\
**Post date:** [October 8, 2018, 10:44am UTC](https://discourse.cakephp.org/t/solved-contain-results-in-ambiguouty/5070/1 "2018-10-08T10:44:35Z")

</div>

Hii there,

I’m trying to load articles from our database using the following code:

```auto
$articles = $this->Articles->find('all',['order' => ['created' => 'DESC']])->contain(['Tags','Users']);

```

This, however, throws the error: `Integrity constraint violation: 1052 Column 'created' in order clause is ambiguous`.  
This is the SQL output I get:

```auto
SELECT Articles.id AS `Articles __id`, Articles.user_id AS `Articles__ user_id`, Articles.title AS `Articles __title`, Articles.slug AS `Articles__ slug`, Articles.body AS `Articles __body`, Articles.published AS `Articles__ published`, Articles.created AS `Articles __created`, Articles.modified AS `Articles__ modified`, Users.id AS `Users __id`, Users.username AS `Users__ username`, Users.email AS `Users __email`, Users.password AS `Users__ password`, Users.created AS `Users__created` FROM articles Articles INNER JOIN users Users ON Users.id = (Articles.user_id) ORDER BY created DESC

```

This error makes no sense to me, as when I remove the `Users` from the content (so it will be `->contain(['Tags'])`), it works without issues.

Simply removing the `,['order' => ['created' => 'DESC']]` from the `find()` does also get rid of the error, however, when I do that it will get the items in the wrong order.

Any clues on how to fix this?

EDIT: literally a few seconds after posting this I found the solution:  
replace `['created' => 'DESC']` with `['Articles.created' => 'DESC']`
