Alexander Nicolaysen Sørnes : vendor: Respect state in objectGetEntries[Count]

Chris Morgan cmorgan at winehq.org
Sun Jun 15 10:45:24 CDT 2008


Module: appdb
Branch: master
Commit: f78a7c931b91e4d7ca7709e3460f50a4599832dd
URL:    http://source.winehq.org/git/appdb.git/?a=commit;h=f78a7c931b91e4d7ca7709e3460f50a4599832dd

Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date:   Sun Jun 15 12:30:45 2008 +0200

vendor: Respect state in objectGetEntries[Count]

---

 include/vendor.php |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/vendor.php b/include/vendor.php
index e3a16dd..4537f93 100644
--- a/include/vendor.php
+++ b/include/vendor.php
@@ -258,9 +258,9 @@ class Vendor {
         if(!$iRows)
             $iRows = Vendor::objectGetEntriesCount($sState);
 
-        $hResult = query_parameters("SELECT * FROM vendor
-                       ORDER BY $sOrderBy $sOrder LIMIT ?,?",
-                           $iStart, $iRows);
+        $hResult = query_parameters("SELECT * FROM vendor WHERE state = '?'
+                                     ORDER BY $sOrderBy $sOrder LIMIT ?,?",
+                                     $sState, $iStart, $iRows);
 
         if(!$hResult)
             return FALSE;
@@ -407,7 +407,8 @@ class Vendor {
         if($sState == 'rejected')
             return FALSE;
 
-        $hResult = query_parameters("SELECT COUNT(vendorId) as count FROM vendor");
+        $hResult = query_parameters("SELECT COUNT(vendorId) as count FROM vendor WHERE state = '?'",
+                                     $sState);
 
         if(!$hResult)
             return FALSE;




More information about the wine-cvs mailing list