Thanks AD7six, this fixed my issue and is something that I trip over a lot. I will certainly try to remember this in future.
On Friday, June 20, 2014 3:54:27 PM UTC+1, vbpupil wrote:
-- On Friday, June 20, 2014 3:54:27 PM UTC+1, vbpupil wrote:
hey Guys
im getting this errorDatabase Error
Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'saveMyInv' at line 1
SQL Query: saveMyInv
from within my App controller im calling
$invId = $this->Invoices->saveMyInv(array(
'Invoices.user_id'=>$property['User']['id'],
'Invoices.property_id'=>$transaction[' InstantPaymentNotification'][' custom'],
));
and from my Invoice model my code is:
public function saveMyInv($data){
if ($this->save($data)) {
return $this->getLastInsertId();
}
}
whats odd is that it thinks my sql query is saveMyInv
have been stumped for a while now, so any help is greatly appreciated.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment