Hi,
I have the following code
$result = $handle->select()->from('store_products_id', array('count'=>'COUNT(store_products_id.product_id)'))
->where('store_products_id.store_id=?', $this->store_id)
->columns($selectColumns)
->join('product_quickinfo', 'store_products_id.product_id =
product_quickinfo.product_id')
->join('image_paths', 'product_quickinfo.image_id =
image_paths.image_id')
->order('product_quickinfo.date_created DESC')
->limitPage($this->page_number, $this->sum_each_page)
->query(ZEND_DB::FETCH_OBJ);
However, I only get back one result.. here's a look at the print_r:
Array ( [0] => stdClass Object ( [count] => 14 [small_path] => 1 [product_name] => v evrecvrv [price] => 22 [product_id] => 1 [image_id] => 1 [date_created] => 0000-00-00 00:00:00 [large_path] => [description] => ) )
When I remove the COUNT controller, I get all the items back. How can I both count the entire query (beyond the LIMIT that I impose) and also get the entire query back?
Thanks.