Ignore:
Timestamp:
Feb 9, 2019, 8:45:24 PM (5 years ago)
Author:
roby
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/modules/Elezioni/query.sql

    r256 r257  
    4545        $sth = $dbi->prepare("$sql");
    4646        $sth->execute();       
    47         $row = $sth->fetchAll();
     47        $row = $sth->fetch(PDO::FETCH_BOTH);
    4848        return ($row);
    4949
     
    7878        $sth = $dbi->prepare("$sql");
    7979        $sth->execute();       
    80         $row2 = $sth->fetchAll();
    81     if ($row2) $id_cons = $row2['id_cons'];
     80    if ($sth->rowCount()) list($id_cons) = $sth->fetch(PDO::FETCH_NUM);
    8281        else    $espandi=1;
    8382        if(!isset($tipo_cons))$tipo_cons=0;
     
    8786        $sth = $dbi->prepare("$sql");
    8887        $sth->execute();       
    89         $row2 = $sth->fetchAll();
    90         $limite=$row2[0];
     88        if ($sth->rowCount()){
     89                $row2 = $sth->fetchAll();
     90                $limite=$row2[0];
     91        }
    9192        return($row);
    9293}
     
    187188        $sth = $dbi->prepare("$sql");
    188189        $sth->execute();       
    189         $row = $sth->fetchAll();
     190        $row = $sth->fetch(PDO::FETCH_BOTH);
    190191        return($row);
    191192}
Note: See TracChangeset for help on using the changeset viewer.