I am still having problems getting table relationships defined, and have just changed the relationship between users and comment classes as advised, but when I went to test I got a new error.
C:\wamp\www\megashare\application\models\UsersMapper.php
public function deleteUser($id, Default_Model_Users $users){
$usersTable = new Default_Model_DbTable_Users();
$usersRowset = $usersTable->find( $id );
$userToDelete = $usersRowset->current();
$userToDelete->delete();
}
Generates the following error:
Zend Error Type: EXCEPTION_OTHER
REQUEST_URI: /megashare/public/users/delete/userId/14
Stack trace:
#0 C:\wamp\www\megashare\application\models\UsersMapper.php(104): Zend_Db_Table_Row_Abstract->delete()
#1 C:\wamp\www\megashare\application\models\Users.php(761): Default_Model_UsersMapper->deleteUser(14, Object(Default_Model_Users))
#2 C:\wamp\www\megashare\application\controllers\UsersController.php(112): Default_Model_Users->deleteUser(14)
#3 C:\wamp\www\megashare\library\Zend\Controller\Action.php(512): UsersController->deleteAction()
#4 C:\wamp\www\megashare\library\Zend\Controller\Dispatcher\Standard.php(288): Zend_Controller_Action->dispatch('deleteAction')
#5 C:\wamp\www\megashare\library\Zend\Controller\Front.php(936): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#6 C:\wamp\www\megashare\library\Zend\Application\Bootstrap\Bootstrap.php(77): Zend_Controller_Front->dispatch()
#7 C:\wamp\www\megashare\library\Zend\Application.php(303): Zend_Application_Bootstrap_Bootstrap->run()
#8 C:\wamp\www
\megashare\public\index.php(31): Zend_Application->run()