i have my controller function like this:
private function _send_refund_scores($userId,$scores,$orderId){
$this->loadModel('Score');
$rtn = $this->Score->refund_user_scores($userId,$scores,$orderId);
if(!empty($rtn)){
return true;
}else return false;
}
while in another model Score , I have model function refund_user_scores
;
the error like this:
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 'refund_user_scores' at line 1
so,any idea?
I guess you have defined
refund_user_scores()
as a private function in modelScore
.That is why you are getting this error.