Jump to content

Problem with sorting


Recommended Posts

Hi I have an strange problem with sorting of my page details using API.

I use this code for getting the sorted result :

$notes = $pages->find("parent=/notes/,limit=20,sort=-modified");
foreach($notes as $note){
if($user->name = $note->createdUser->name){
<li style="padding: 5px">
<div class="row">
<div class="col-md-8">
<div class="desc">
<span class="label label-sm bg-<?php echo $crm_color; ?>">
<i class="fa fa-<?php echo $crm_icon; ?>"></i> <?php echo $note->crm_type; ?>
<?php echo substr($note->crm_comment, 0, 30).' ...'; ?>
<div class="col-md-4 text-right">
<i class="fa fa-clock-o"></i> <?php echo date("Y/m/d h:s", $note->modified); ?>

and look at the result in attachment the dates are random.


Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...