Modif de la liste des produits par dfaut

This commit is contained in:
Rodolphe Quiedeville 2003-07-10 18:09:12 +00:00
parent 3b92060224
commit 8c891a60d3
2 changed files with 3 additions and 3 deletions

View File

@ -169,7 +169,7 @@ if ($action == 'create')
* Liste des elements
*
*/
$sql = "SELECT p.rowid,p.label,p.ref,p.price FROM llx_product as p ORDER BY p.ref";
$sql = "SELECT p.rowid,p.label,p.ref,p.price FROM llx_product as p ORDER BY p.nbvente DESC LIMIT 20";
if ( $db->query($sql) )
{
$opt = "<option value=\"0\" SELECTED></option>";

View File

@ -332,7 +332,7 @@ if ($propalid)
if ($obj->statut == 0)
{
$sql = "SELECT p.rowid,p.label,p.ref,p.price FROM llx_product as p ORDER BY p.ref";
$sql = "SELECT p.rowid,p.label,p.ref,p.price FROM llx_product as p ORDER BY p.nbvente DESC LIMIT 20";
if ( $db->query($sql) )
{
$opt = "<option value=\"0\" SELECTED></option>";
@ -693,7 +693,7 @@ if ($propalid)
print "</tr>\n";
$var=True;
while ($i < $num)
while ($i < min($num,$limit))
{
$objp = $db->fetch_object( $i);