Changeset 88


Ignore:
Timestamp:
May 2, 2011, 9:19:45 PM (13 years ago)
Author:
roby
Message:
  • Aggiornata la funzione di import consultazioni per adattarla alla nuova tabella ele_gruppo
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/modules/Elezioni/importa.php

    r80 r88  
    3030        $newidg=0;
    3131        $oldidg=0;
     32        $isnew=0;
    3233        foreach($rigagruppo as $key=>$campo){
    3334                if ($key==0) $valori="'$idcns',";
     
    3637                else $valori.= ",'$campo'";
    3738                if ($key==2) $numgruppo= $campo;
    38         }
     39                if ($key==8) $isnew=1;
     40        }
     41        if (!$isnew) $valori.=",null,null";
    3942        if(isset($valori)){
     43
    4044                $res_gruppo = mysql_query("insert into ".$prefix."_ele_gruppo values($valori)" ,$dbi)||die("(1104) Non e' stato possibile inserire i gruppi nel database! contattare l'amministratore".mysql_error());
    4145                $resnew = mysql_query("select id_gruppo from ".$prefix."_ele_gruppo where num_gruppo='$numgruppo' and id_cons='$idcns'" ,$dbi);
    42                 $resnew = mysql_query("select id_gruppo from ".$prefix."_ele_gruppo where num_gruppo='$numgruppo' and id_cons='$idcns'");
    4346                list ($newidg) = mysql_fetch_row($resnew);
    4447                unset($valori);
Note: See TracChangeset for help on using the changeset viewer.