Example to use External Variables

Example to use External Variables

impex09impex09 Posts: 45Questions: 20Answers: 0
edited August 2019 in DataTables

I have this query:

Editor::inst( $db, 'impx_ccps_assigned_products_by_users', 'id')
->where( function ( $q ) use ( $id_user ) {
    $q->where( 'impx_ccps_assigned_products_by_users.id_user', $id_user, '=');
} )

    ->fields(

My idea is can to send the variable $id_user,
$id_user is defined in my .js file

can you help me how to do this?

or can you share an example please?

regards.

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @impex09 ,

    This thread should help, it's asking the same thing.

    Cheers,

    Colin

  • impex09impex09 Posts: 45Questions: 20Answers: 0

    thank you I will test it and let you know , best

This discussion has been closed.