Note that there are some explanatory texts on larger screens.

plurals
  1. POZend Framework Deleting through a data mapper module.
    text
    copied!<p>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.</p> <pre><code>C:\wamp\www\megashare\application\models\UsersMapper.php public function deleteUser($id, Default_Model_Users $users){ $usersTable = new Default_Model_DbTable_Users(); $usersRowset = $usersTable-&gt;find( $id ); $userToDelete = $usersRowset-&gt;current(); $userToDelete-&gt;delete(); } </code></pre> <p>Generates the following error:</p> <pre><code>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-&gt;delete() #1 C:\wamp\www\megashare\application\models\Users.php(761): Default_Model_UsersMapper-&gt;deleteUser(14, Object(Default_Model_Users)) #2 C:\wamp\www\megashare\application\controllers\UsersController.php(112): Default_Model_Users-&gt;deleteUser(14) #3 C:\wamp\www\megashare\library\Zend\Controller\Action.php(512): UsersController-&gt;deleteAction() #4 C:\wamp\www\megashare\library\Zend\Controller\Dispatcher\Standard.php(288): Zend_Controller_Action-&gt;dispatch('deleteAction') #5 C:\wamp\www\megashare\library\Zend\Controller\Front.php(936): Zend_Controller_Dispatcher_Standard-&gt;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-&gt;dispatch() #7 C:\wamp\www\megashare\library\Zend\Application.php(303): Zend_Application_Bootstrap_Bootstrap-&gt;run() #8 C:\wamp\www\megashare\public\index.php(31): Zend_Application-&gt;run() #9 {main} </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload