Failed to execute SQL. Error: You have an error in your SQL

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sagmag
User
Posts: 182

Failed to execute SQL. Error: You have an error in your SQL

Post by sagmag »

I have a view from my database but the problem is when I am inserting a new record from the add web page ... the application is returning this mysql error... I fail to understand from where the error is coming from and how can I track it.


kirondedshem
User
Posts: 642

Post by kirondedshem »

if its failing at the sql side and you are sure you dont have any other sql queries you are calling duirng the update events. Then

  1. check that the view is purely editable ie contains only fileds of one table(not join or whatever).
  2. Check that the constraints you have on your tbale are not being violated ie primary key, foregn keys, unique keys etc. Basiclly the values you are updating with should still comform to any existing constarints on the base table.

If you have nay other customised code in row_updating then try to remove it and see if it still brings the error.


arbei
User
Posts: 9284

Post by arbei »

Enable the option "Debug" in [Tools] -> [Advanced Settings] then generate all files and try again.

It will display the SQL that retrieving the records, so you can debug with the SQL by running it in the database manager.


Post Reply