OptionsConnector isn't working

Hi,

The problem with complex query . Mine query :

SELECT a.grupe as grupe,a.eile as eile,a.op_nr as op_nr,b.pav_lt as pav_lt,b.opr_laik as opr_laik,b.irengin as irengin,a.padal as padal,a.opr_grupe as opr_grupe,a.kontr_opr as kontr_opr,a.skaid as skaid FROM gam_opr a INNER JOIN opr b ON a.op_nr=b.op_nr and b.db=‘ut’ WHERE ( a.model=‘020-605’ and a.db=‘ut’) LIMIT 0,200

php source :

<?php
require_once( "config.php" );
require( "php/codebase/grid_connector.php" );
require( "php/codebase/db_mysqli.php" );

$slc_tbl = $_GET[ 'tbl' ];
$slc_fld = $_GET[ 'fld' ];
$slc_qry = $_GET[ 'qry' ];
$kalba   = $_GET[ 'k_l' ];
$slc_db  = $_GET[ 'd_b' ];
$slc_mod = $_GET[ 'mdl' ];
$slc_fl2 = $_GET[ 'sl2' ];

$link    = new mysqli( $myServ, $myUser, $myPasw, $myDb );
if ( $link->connect_errno )
   die( 'Prisijungimo klaida : (' . $link->connect_errno . ') ' . $link->connect_error );

$grid = new GridConnector( $link, "MySQLi" );
$grid->dynamic_loading( 200 );
$grid->enable_log( "temp.log", true );      

   $slct1 = new OptionsConnector( $link, "MySQLi" );
   $slct1->render_sql( "select opr_grupe as value, opr_grupe as label from opr_grupes where db = '".$slc_db."' order by opr_grupe asc", "opr_grupe", "opr_grupe(value),opr_grupe(label)" );
   $grid->set_options( "a.opr_grupe(opr_grupe)", $slct1 );
   //$grid->set_options( "opr_grupe", $slct1 ); // previuos version ...

   $slct2 = new OptionsConnector( $link, "MySQLi" );
   $slct2->render_sql( "select padal as value, padal as label from padal where db = '".$slc_db."' order by padal asc", "padal", "padal(value),padal(label)" );
   $grid->set_options( "a.padal(padal)", $slct2 );
   //$grid->set_options( "padal", $slct2 ); // previuos version ...

   $slct3 = new OptionsConnector( $link, "MySQLi" );
   $slct3->render_sql( "select opr_kontr as value, opr_kontr as label from opr_kontr where db = '".$slc_db."' order by opr_kontr asc ", "opr_kontr", "opr_kontr(value),opr_kontr(label)" );
   $grid->set_options( "a.kontr_opr(kontr_opr)", $slct3 );
   //$grid->set_options( "kontr_opr", $slct3 );  // previuos version ...

$grid->render_sql( $slc_qry, "rec_id", $slc_fl2 );
?>

The first problem was that #connector_select_filter was not working as expected - it returned error " Column: ‘kontr_opr’ in where clause is ambiguous " . But OptionConnector was working , editing colum ( “co” or “coro” type ) it returned all values . Searching through forum I found that : viewtopic.php?f=14&t=11913&p=34130&hilit=in+where+clause+is+ambiguous#p34130

I redid render_sql and now $slc_fl2 look like “a.kontr_opr(kontr_opr)” . Now #connector_select_filter is working fine . But editing column values I’m seeing only values from that model , not all values . Log file say the same - optionConnector isn’t working , it do only simple filtering .

SELECT DISTINCT a.op_nr as value FROM gam_opr a INNER JOIN opr b ON a.op_nr=b.op_nr and b.db=‘ut’ WHERE ( a.model=‘020-605’ and a.db=‘ut’)

SELECT DISTINCT a.padal as value FROM gam_opr a INNER JOIN opr b ON a.op_nr=b.op_nr and b.db=‘ut’ WHERE ( a.model=‘020-605’ and a.db=‘ut’)

SELECT DISTINCT a.opr_grupe as value FROM gam_opr a INNER JOIN opr b ON a.op_nr=b.op_nr and b.db=‘ut’ WHERE ( a.model=‘020-605’ and a.db=‘ut’)

SELECT DISTINCT a.kontr_opr as value FROM gam_opr a INNER JOIN opr b ON a.op_nr=b.op_nr and b.db=‘ut’ WHERE ( a.model=‘020-605’ and a.db=‘ut’)

How to solve this problem ? What you can suggest ?

Thanks in advance ! Workin with Suite Pro 3.5 version …

Any suggestion ? Please …

So nothing can’t to help ? Or mine question is understable ?

OK , other question . If OptionsConnector isn’t working , can you direct me , how to fill select for editable cell ?

With best regards !