Server side table order

Server side table order

ecolores93ecolores93 Posts: 2Questions: 1Answers: 0

Hi, i want to order a joined table in the server side (PHP script).

How i can do that?

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    I don't understand. Could you provide a more detailed explanation of what you want to do?

  • ecolores93ecolores93 Posts: 2Questions: 1Answers: 0

    i have this code:

    Editor::inst( $db, 'datatables_demo' )
    ->fields(
    Field::inst( 'first_name' )->validator( 'Validate::notEmpty' ),
    Field::inst( 'last_name' )->validator( 'Validate::notEmpty' ),
    Field::inst( 'position' ),
    Field::inst( 'email' ),
    Field::inst( 'office' ),
    Field::inst( 'extn' ),
    Field::inst( 'age' )
    ->validator( 'Validate::numeric' )
    ->setFormatter( 'Format::ifEmpty', null ),
    Field::inst( 'salary' )
    ->validator( 'Validate::numeric' )
    ->setFormatter( 'Format::ifEmpty', null ),
    Field::inst( 'start_date' )
    ->validator( 'Validate::dateFormat', array(
    "format" => Format::DATE_ISO_8601,
    "message" => "Please enter a date in the format yyyy-mm-dd"
    ) )
    ->getFormatter( 'Format::date_sql_to_format', Format::DATE_ISO_8601 )
    ->setFormatter( 'Format::date_format_to_sql', Format::DATE_ISO_8601 )
    )
    ->process( $_POST )
    ->json();

    i want to order by "extn" column

This discussion has been closed.