-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error: Uncaught exception 'Phalcon\Mvc\Model\Exception' with message 'Syntax error, #11064
Comments
try public function sil($id){
$urun = urunler::findFirst(
array(
"urunNo = :id:",
"bind" => ['id' => $id]
));
$urun->delete($id);
} or public function sil($id){
$urun = urunler::findFirst($id); // urunNo must be PK
$urun->delete($id);
} or public function sil($id){
$urun = urunler::findFirst(
array(
"urunNo = $id"
));
$urun->delete($id);
} |
I do not want to delete the record |
There's an error in the model. The This should work: public function sil($id){
$urun = urunler::findFirst(
array(
"conditions" => "urunNo = :urunNo:",
"bind" => ["urunNo" => $id]
));
$urun->delete($id);
} |
I actually think he was trying to find all records where urunNo is equal to or higher than, which is ">=" and not "=>" |
I received this error after unintentionally creating a duplicate endpoint in routes.php. I had two identical POST paths each with a different corresponding function. I was using a Micro app. I'm not sure if the error was coming from |
For questions like this you can use forum: https://forum.phalconphp.com/ |
Model
Controller
The text was updated successfully, but these errors were encountered: