Joomla.it Forum

Joomla! 1.0.x (versione con supporto terminato) => Le voci di Joomla.it (solo per versione Joomla 1.0.x) => : galassya 18 Dec 2007, 09:03:01

: Facileforms query che non prende un parametro
: galassya 18 Dec 2007, 09:03:01
ho crato un seleziona lista:
:
$squadra = ff_getParam('ff_param_squadra', 0);
$rows = ff_select(
            "select id, squadra from squadre ".
            "order by squadra "
        );
$flag = 0;
$list = '';
if (!is_null($rows))
    foreach ($rows as $row)
        if ($row->id==$squadra) {
            $flag = 1;
            $list .= "1;$row->squadra;$row->id\r\n";
        } else
            $list .= "0;$row->squadra;$row->id\r\n";

if ($flag) return $list;
return "1;Seleziona Squadra;''\r\n".$list;

poi in action script ho crato una funzione cambia su selezione del record:
:
function ff_squadra_action(element, action)
{
    ff_redirectParent(
        '<?php return ff_makeSelfUrl(); ?>'+
        '&ff_param_squadra='+element.value+
        '&ff_param_name='+escape(ff_getElementByName('squadra').value)
    );
} // ff_squadra_action

dopodiche ho crato un lista query
:

$id_squadra  = ff_getParam('ff_param_squadra', 0);

$rows = ff_select(
    " select id_staff, id_squadra, nome, cellular from staff ".
    " where id_squadra = "$id_squadra.
    " order by nome"
);

ma non riesco a leggere quell'id_squadra

dove sta l'errore??