I am kinda new to ZF1 and Doctorine, and I can't figure out the problem. I inherited an old protect so I am learning as I go with this one.
Here is whats in my model
public function recordResponded($contact_id = 0)
{
$this->createQuery()
->update()
->set($this->_tableAlias . 'responded', '1')
->where($this->_tableAlias . '.responded.contact_id', $contact_id)
->execute()
;
return true;
}
Here is what is in my Controller
public function responseAction() {
header('Content-Type: application/json');
$this->getHelper('layout')->disableLayout();
$this->getHelper('viewRenderer')->setNoRender(true);
$contact_id = $this->getRequest()->getPost('contact_id', null);
if(empty($contact_id) || !preg_match("/^[0-9]+$/", $contact_id)) {
echo json_decode(array('message' => 'Failed to record response, numeric id required'));
}
Model_ContactTable::getInstance()->recordResponded($contact_id);
echo json_encode(['status' => 'success']);
}
and for whatever reason I have no idea currently cause I'm looking around everywhere else and from what I can gather this is the correct way to update a single entry on a row in my DB.
Does anyone else see something I am missing? I just keep getting an error, but its an override, type of error with no stack trace or anything else, which that would be awesome to have to but I can't figure how to turn that on either. Anyway, anything?