/[dolibarr]/dolibarr/htdocs/lib/mysql.lib.php
ViewVC logotype

Diff of /dolibarr/htdocs/lib/mysql.lib.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.58 by eldy, Sun Jul 10 20:23:52 2005 UTC revision 1.59 by rodolphe, Sun Jul 31 09:17:24 2005 UTC
# Line 549  class DoliDb Line 549  class DoliDb
549          return  $this->results;          return  $this->results;
550      }      }
551    
552    
553        /**
554            \brief      Renvoie toutes les données comme un tableau.
555            \param      sql requete sql
556            \return     array
557        */
558    
559        function fetch_all_rows($sql, &$datas)
560        {
561          $datas = array();
562    
563          $resql = $this->query($sql);
564          if ($resql)
565            {
566              $i = 0;
567              $num = $this->num_rows($resql);
568    
569              while ($i < $num)
570                {
571                  $row = $this->fetch_row($resql);
572                  array_push($datas, $row[0]);
573                  $i++;
574                }
575            }
576          else
577            {
578              print $this->error();
579            }
580          return $result;
581        }
582  }  }
583    
584  ?>  ?>

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26