Jump to content
Дизайн и модификация IPS Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
markere

mysql сортировка данных для отображения

Recommended Posts

Помогли мне набросать код для отображения данных, но беда -  отображение нужно сделать наоборот, для отображения на странице.

 

  {{$result = \IPS\Db::i( 'mydatabase' )->select( '*', 'banlog' );}}

  {{foreach $result as $row}}
    <p>[{$row['day']}:{$row['mounth']}:{$row['year']}] {$row['text']}<br></p>
  {{endforeach}}

image.png.94768a35d187d7aea31d3bed3c40cdf9.png

Нужно, чтобы "Сообщение 2" было сверху. Благодарю за любую помощь!

Share this post


Link to post
{{$result = \IPS\Db::i( 'mydatabase' )->select( '*', 'banlog', NULL, 'id DESC' );}}

id DESC - id это название поле с первичным ключом в таблице.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...