request in Server side (PHP)
request in Server side (PHP)

Hello, please tell me how to make a subquery with the output of the result?
In this code:
<?php
/*
* Example PHP implementation used for the index.html example
*/
// DataTables PHP library
include( "lib/DataTables.php" );
// Alias Editor classes so they are easy to use
use
DataTables\Editor,
DataTables\Editor\Field,
DataTables\Editor\Format,
DataTables\Editor\Mjoin,
DataTables\Editor\Options,
DataTables\Editor\Upload,
DataTables\Editor\Validate,
DataTables\Editor\ValidateOptions,
DataTables\Editor\SearchPaneOptions;
Editor::inst( $db, 'all_groups' )
->field(
Field::inst('all_groups.id')->searchPaneOptions(SearchPaneOptions::inst()),
Field::inst('all_groups.name')->searchPaneOptions( SearchPaneOptions::inst()),
)
->debug(true)
->process($_POST)
->json();
Add another pillar output based on query:
select id_proekta, sum(sum) as sum from (
select id_proekta,sum from repa union all
select id_proekta,sum from repa_r
) x WHERE id_proekta = '.all_groups.id.''
This discussion has been closed.
Answers
There is no option for that in Editor's PHP libraries at the moment I'm afraid. You would need to use an SQL VIEW for a more complex query such as that.
Regards,
Allan