limit and order

limit and order

deepwebdeepweb Posts: 3Questions: 2Answers: 0
edited March 2016 in Free community support

hello im use php class Editor

// Build our Editor instance and process the data coming from _POST
Editor::inst( $db, 'messages', 'id' )
    ->fields(
    Field::inst( 'user_id' ),
        Field::inst( 'cust_id' ),
        Field::inst( 'status' ),
        Field::inst( 'name_id' ),
        Field::inst( 'subname_id' ),
        Field::inst( 'message' ),
        Field::inst( 'min' ),
        Field::inst( 'max' ),
        Field::inst( 'cur' ),
        Field::inst( 'event_time' ),
        Field::inst( 'sms_send' ),
        Field::inst( 'email_send' )
    )
  //  ->order( 'id DESC' )
  ->where( 'user_id', $_SESSION['uid'], '=' )

    ->process( $_POST )
    ->json();

if i use // ->order( 'id DESC' ) return error
if use limit return error

php class not have method limit and order ?

Answers

  • deepwebdeepweb Posts: 3Questions: 2Answers: 0

    ?

  • allanallan Posts: 63,783Questions: 1Answers: 10,511 Site admin

    The Editor class doesn't have and order() method (list of methods it does have) which is why it will give you an error.

    The order of the data returned from the server shouldn't be relevant as the sorted is done on the client-side when using client-side processing. Why do you want to have it sort both on the client and the server?

    Allan

This discussion has been closed.