/[dolibarr]/dolibarr/htdocs/html.form.class.php
ViewVC logotype

Diff of /dolibarr/htdocs/html.form.class.php

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

revision 1.122 by eldy, Mon Oct 10 19:47:37 2005 UTC revision 1.123 by eldy, Mon Oct 10 20:20:31 2005 UTC
# Line 526  class Form Line 526  class Form
526      *    \param      htmlname        Nom de la zone select      *    \param      htmlname        Nom de la zone select
527      *    \param      filtretype      Pour filtre sur type de produit      *    \param      filtretype      Pour filtre sur type de produit
528      *    \param      limit           Limite sur le nombre de lignes retournées      *    \param      limit           Limite sur le nombre de lignes retournées
     *    \param      filtre          Pour filtre  
529      */      */
530      function select_produits($selected='',$htmlname='productid',$filtretype='',$limit=20,$filtre)      function select_produits($selected='',$htmlname='productid',$filtretype='',$limit=20)
531      {      {
532          global $langs,$conf;          global $langs,$conf;
533            
# Line 536  class Form Line 535  class Form
535          $sql.= " FROM ".MAIN_DB_PREFIX."product as p ";          $sql.= " FROM ".MAIN_DB_PREFIX."product as p ";
536          $sql.= " WHERE p.envente = 1";          $sql.= " WHERE p.envente = 1";
537          if ($filtretype && $filtretype != '') $sql.=" AND p.fk_product_type=".$filtretype;          if ($filtretype && $filtretype != '') $sql.=" AND p.fk_product_type=".$filtretype;
         if ($filtre) $sql.="$filtre";  
538          $sql.= " ORDER BY p.nbvente DESC";          $sql.= " ORDER BY p.nbvente DESC";
539          if ($limit) $sql.= " LIMIT $limit";          if ($limit) $sql.= " LIMIT $limit";
540            

Legend:
Removed from v.1.122  
changed lines
  Added in v.1.123

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