Problem with new Manage Relational Table
Hi,
I am trying to apply the new manage relational table mith mysli and i have two problems.
First, the interface does not allow me to select the type of data. I have managed to fix it by changing it in the code.
Second I get this error:
Fatal error: Call to undefined method WA_MySQLi_Query::getSelected() in ...
The part of the input code is:
------------------------------------------------------------------------------
<?php
$wa_repeatfor = -1; // Repeat Selection 1
if (!isset($wa_repeatcount)) $wa_repeatcount = 0;
while (!$rsIconos->atEnd() && $wa_repeatfor != 0) {
$wa_repeatfor--;
$wa_repeatcount++;
if (!$rsIconos->atEnd()) {
?>
<div class="iconoWrp">
<div class="iconoSelect">
<input type="hidden" name="mrt[]" id="mrt_<?php echo($wa_repeatcount); ?>" value="<?php echo($wa_repeatcount); ?>" />
<input <?php echo(in_array(undefined,$RelationalQuery_1->getSelected())?"checked":""); ?> name="checkbox<?php echo($wa_repeatcount); ?>" type="checkbox" id="checkbox_<?php echo($wa_repeatcount); ?>" form="formIconos" />
</div>
</div>
<input type="hidden" name="WA_RepeatID<?php echo($wa_repeatcount); ?>" value="<?php echo($wa_repeatcount); ?>">
<?php
if ($wa_repeatfor != 0) $rsIconos->moveNext(); // Repeat Alternate 1
} else {
?>
<?php
} // End Repeat Alternate 1
?>
<?php
}
if (!isset($wa_startindex)) $rsIconos->moveFirst(); // End Repeat Selection 1
?>
------------------------------------------------------------------------------
Maybe that "undefined" is the problem?
The part of the relationship Before the html):
----------------------------------------------------------------------------------------
<?php
$RelationalQuery_1 = new WA_MySQLi_Query($conexioni);
$RelationalQuery_1->Action = "relational";
$RelationalQuery_1->Table = "prod_icoitems";
$RelationalQuery_1->addRelationship("iditem", "idico");
$RelationalQuery_1->bindColumn("iditem", "i", "".$_GET['iditem'] ."", "WA_DEFAULT");
$RelationalQuery_1->bindColumn("idico", "i", (isset($_POST["checkbox"])?$_POST["checkbox"]:""), "WA_DEFAULT", "checkbox");
if ($_SERVER["REQUEST_METHOD"] === "POST") {
$RelationalQuery_1->execute();
$RelationalGoTo = "ok.php";
if (function_exists("rel2abs")) $RelationalGoTo = $RelationalGoTo?rel2abs($RelationalGoTo,dirname(__FILE__)):"";
$RelationalQuery_1->redirect($RelationalGoTo,false);
}
?>
----------------------------------------------------------------------------------------
thanks!