function editqtyAction()
{
// Dissable view and layout.
$this->_helper->viewRenderer->setNoRender();
$this->_helper->layout()->disableLayout();
if ($this->_request->isPost()) {
// Get the parameters from request and store in an array.
$nest_components_id = $this->_request->getPost('nest_components_id');
$qty = $this->_request->getPost('qty');
$data = array('qty' => $qty);
// Push to the database.
$model = new Titanium_Model_NestComponents;
$where = 'nest_components_id = ' . $nest_components_id;
$id = $model->update($data, $where);
echo(qty);
}
}
However, I get a 500 internal server error. From the stack trace I can see the SQL generated is;
"UPDATE `nest_components` SET `qty` = ?, `modified_date` = ?, `modified_by_id` = ? WHERE (id=)"
So it looks like the WHERE clause is incorrect. I don't understand where the (id=) part is coming from, and why has it not used the where clause I specified?
Steve
________________________________
-
Williams Refrigeration is a trading name of AFE Group Limited.
Registered in England & Wales under Registered Number 3872673. Registered
Office Address - Bryggen Road, North Lynn, Industrial Estate, Kings Lynn, Norfolk, PE30 2HZ
Williams Refrigeration filters email attachments for spam and viruses and malicious content with Sophos Puremessage. While every care has been made to ensure that this message is secure and virus free, we cannot be held responsible for any damage arising from computer viruses and advise that you perform your own checks on this and any other inbound messages.
This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error or are having trouble sending email to us please notify the system administrator - postmaster@williams-refrigeration.co.uk
Any views or opinions expressed in this e-mail are those of the sender and do not necessarily coincide with those of Williams Refrigeration or the AFE Group.
没有评论:
发表评论