Example to use External Variables

Example to use External Variables

impex09impex09 Posts: 26Questions: 13Answers: 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: 8,013Questions: 0Answers: 1,348

    Hi @impex09 ,

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

    Cheers,

    Colin

  • impex09impex09 Posts: 26Questions: 13Answers: 0

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

Sign In or Register to comment.