fetchall

Zend Framework fetchAll

Can i override fetchall method in a model? I need to check sth everytime fetchAll is called. The model extends Zend_db_table_abstract ...

Increment values using Zend_DB_Table Raw SQL

I have a website where a user can upload images for a real estate property. The table structure: image_id property_id userid filename thumbfilename display_order timestamp The scenario: When a user uploads multiple pictures, he / she SHOULD be able to set the primary photo from their uploaded images for the specified property. Th...

PDO looping throug and printing fetchAll

I'm having trouble getting my data from fetchAll to print selectively. In normal mysql I do it this way: $rs = mysql_query($sql); while ($row = mysql_fetch_array($rs)){ $id = $row['id']; $n = $row['n']; $k = $row['k']; } In PDO, I'm having trouble. I bound the params, then I'm saving the fetched data into $rs like above, wi...

Zend Framework. The best solution to calculate rows in the table.

Hi, guys! I'm newbie in ZF and have some stupid question: What's the best solution to calculate rows in the table if I work with inherited object of Zend_Db_Table_Abstract class? For my first web application I use QuickStart tutorial (link text) so if I want to calculate count of rows in the table in controller the simplest solution ...

Zendframework / PgSQL fetchAll orderby

i have a pgsql table with fields id, identifier, name. id serial NOT NULL, identifier character varying(16), name character varying(128) I want to fetchAll values from the table orderby identifier. but identifier is having values 12, 100, 200, 50 and after $table->fetchAll(null, 'identifier'); is giving the result 100, 12, ...

[zend][db] fetchAll with multiple variables

Hi everybody, I'm trying to use fetchAll on a query that has 2 variables. I can't figure out the syntax. I can manage with only 1 variable: $sql = "SELECT * FROM mytable WHERE field1 = ?"; $this->_db->fetchAll($sql,$value1); # that works However I'm having some issues when query has multiple variables $sql = "SELECT * FROM mytable ...