开发者

Weird database item arragment in a Symfony app

I'm following the Jobeet Tutorial Day 7 for Symfony.

After finishing The Category Link step of day 7, the Sensio lab Web developer Item goes to the back (as you can see in the picture from the tutorial is at the top of the Programming category).

The item has id 1 so I don't really understand why it goes to the back (it becomes approximately number 20 of the list (in the tutorial the item doesn't mov开发者_如何学运维e its position).

Any suggestions to fix this arrangement issue?

Weird database item arragment in a Symfony app

(source: symfony-project.org)


I spent around 3 hours comparing the files and I discovered this:

The SVN has this:

$q->andWhere($alias . '.expires_at > ?', date('Y-m-d h:i:s', time()))
  ->addOrderBy($alias . '.expires_at DESC');

The tutorial file has this:

$q->andWhere($alias . '.expires_at > ?', date('Y-m-d H:i:s', time()))
  ->addOrderBy($alias . '.created_at DESC');

Is this an error from the tutorial?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜