Module: appdb Branch: master Commit: f78a7c931b91e4d7ca7709e3460f50a4599832dd URL: http://source.winehq.org/git/appdb.git/?a=commit;h=f78a7c931b91e4d7ca7709e34...
Author: Alexander Nicolaysen Sørnes alex@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;