From 6beb90fc87a3fd6cd680b7275cdf1d55d2cde1bf Mon Sep 17 00:00:00 2001 From: Juan Ramon Date: Tue, 22 Mar 2011 16:31:26 +0100 Subject: [PATCH] fixed, showing the right number of pictures --- oc-includes/osclass/model/ItemResource.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/oc-includes/osclass/model/ItemResource.php b/oc-includes/osclass/model/ItemResource.php index dfa4c8e..f25e2dc 100755 --- a/oc-includes/osclass/model/ItemResource.php +++ b/oc-includes/osclass/model/ItemResource.php @@ -39,9 +39,9 @@ class ItemResource extends DAO { public function getAllResources($itemId = null) { if(is_null($itemId)) { - return $this->conn->osc_dbFetchResults('SELECT r.*,a.s_title, c.dt_pub_date FROM %s a,%s r JOIN %s c ON c.pk_i_id = r.fk_i_item_id WHERE a.fk_i_item_id = r.fk_i_item_id', $this->getTableItemDescription(), $this->getTableName(), $this->getTableItemName()); + return $this->conn->osc_dbFetchResults('SELECT r.*, c.dt_pub_date FROM %s r JOIN %s c ON c.pk_i_id = r.fk_i_item_id', $this->getTableName(), $this->getTableItemName()); } else { - return $this->conn->osc_dbFetchResults('SELECT r.*,a.s_title, c.dt_pub_date FROM %s a,%s r JOIN %s c ON c.pk_i_id = r.fk_i_item_id WHERE a.fk_i_item_id = r.fk_i_item_id AND r.fk_i_item_id = ' . $itemId, $this->getTableItemDescription(), $this->getTableName(), $this->getTableItemName()); + return $this->conn->osc_dbFetchResults('SELECT r.*, c.dt_pub_date FROM %s r JOIN %s c ON c.pk_i_id = r.fk_i_item_id WHERE r.fk_i_item_id = ' . $itemId, $this->getTableName(), $this->getTableItemName()); } } -- 1.7.3.2+GitX