The problem is calling the join() method:
->join('user_details', 'user_id.uid = user_details.uid')
An optional third argument is the columns from this table. If the argument is absent, it defaults to user_details.* .
Please note that you have added qualified columns from both tables to the from() table, but this does not affect the default value of user_details.* . Sorry, but Zend_Db_Select simply not smart enough to keep track of all this.
You can make a join() call not to add columns by passing an empty array:
->join('user_details', 'user_id.uid = user_details.uid', array())
The qualified columns added in the from() call should still be there. To verify this, type SQL:
print $result . "\n";
Bill karwin
source share