/[dolibarr]/dolibarr/htdocs/comm/prospect/prospects.php
ViewVC logotype

Diff of /dolibarr/htdocs/comm/prospect/prospects.php

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

revision 1.33 by eldy, Tue Sep 6 22:37:37 2005 UTC revision 1.34 by rodolphe, Wed Sep 14 14:44:00 2005 UTC
# Line 98  if ($socname) Line 98  if ($socname)
98  if (! $sortorder) $sortorder="ASC";  if (! $sortorder) $sortorder="ASC";
99  if (! $sortfield) $sortfield="s.nom";  if (! $sortfield) $sortfield="s.nom";
100    
101    $sql .= " ORDER BY $sortfield $sortorder, s.nom ASC ";
102    $sql .= $db->plimit($conf->liste_limit+1, $offset);
103    
104  $sql .= " ORDER BY $sortfield $sortorder, s.nom ASC " . $db->plimit($conf->liste_limit, $offset);  $resql = $db->query($sql);
105    if ($resql)
 $result = $db->query($sql);  
 if ($result)  
106  {  {
107    $num = $db->num_rows($result);    $num = $db->num_rows($resql);
108    
109    if ($num == 1 && $socname)    if ($num == 1 && $socname)
110      {      {
111        $obj = $db->fetch_object($result);        $obj = $db->fetch_object($resql);
112        Header("Location: fiche.php?socid=".$obj->idp);        Header("Location: fiche.php?socid=".$obj->idp);
113      }      }
114    else    else
# Line 149  if ($result) Line 149  if ($result)
149    
150    while ($i < min($num,$conf->liste_limit))    while ($i < min($num,$conf->liste_limit))
151      {      {
152        $obj = $db->fetch_object($result);        $obj = $db->fetch_object($resql);
153                
154        $var=!$var;        $var=!$var;
155    
# Line 185  if ($result) Line 185  if ($result)
185        $i++;        $i++;
186      }      }
187    print "</table>";    print "</table>";
188    $db->free();    $db->free($resql);
189  }  }
190  else  else
191  {  {

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

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