I want to get all the data from 3 tables
users, properties, and users_properties.
So I decided that I would use manytomanyRowset. But, to my surprise, I get data from the properties and users_properties table, but there is no data from the users table. Why is this? I need some columns from the users table, is there a way to tell manytomanyrowset functions that I need data from the current table?
this is my function
public function fetchRegisteredProperties()
{
$userTable = $this->getTable();
require_once APPLICATION_PATH . '/models/DbTable/UsersPropertiesDB.php';
require_once APPLICATION_PATH . '/models/DbTable/PropertiesDB.php';
$propertiesRowset = $table->fetchAll();
$allProperties = array();
foreach ($propertiesRowset as $row) {
$propertiesRowset = $row->findManyToManyRowset(
'Model_DbTable_Properties','Model_DbTable_UsersProperties');
$allProperties = array_merge($tempArray,$propertiesRowset->toArray());
}
return $allProperties;
}
thanks in adavance
Fabian
source
share