Zend_db_adaptor documentation explains
Some RDBMS Brands support auto-incrementing primary keys. A table defined this way generates a primary key value automatically during an INSERT of new row. The return value of the Insert () method isn't the last inserted ID, because the table might not have a auto-incremented Column. Instead, the return value is the number of rows affected (usually 1).
If your table is defined with a auto-incrementing primary key, you can call the Lastinsertid () method after the insert. This method returns the "last value" generated in the scope of the current database connection.
So ...
$id = $db->lastinsertid ();
Should work
Your question is very unclear. Nevertheless, I-I-I-least-a part of a problem you have are that you are confusing insert method from Zend_db_adap Ter_abstract (or Zend_db_adapter_pdo_mysql) with the one from Zend_db_table_abstract. Both These classes have methods this are called insert, but they, work differently.
Insert methods from Zend_db_adapter_abstract returns the ' number of affected rows ' while inserts from Zend_db_table_ab Stract returns "The primary key of the row inserted".
The link that you provided are using insert from Zend_db_table_abstract. However, it seems that you are using insert from ' zend_db_table_abstract. For this reason your are always getting 1 in return.