What to do with an SQL syntax error ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dirk.dinger
    Junior Member
    • Nov 2018
    • 17

    What to do with an SQL syntax error ?

    Hello Espo Developers,

    I have a custom entity "Vertrag" which I have created and used for quite a while now with no problems.
    Most of the time I used the Kanban View for it which works fine. Today I switched to the list view and to my surprise got a "bad server response".

    I look in the log file shows that there is some problem which the generated SQL for that view.

    Is there a way to see to actual SQL statement that is being generated ? Otherwise I have no idea what is the problem. I can not remember to have changed anything in that entity since
    the last time it worked.

    Any help appreciated,
    Dirk


    Espo.ERROR: API [GET]:/:controller/action/:action, Params:Array ( [controller] => Vertrag [action] => listKanban ) , InputData: - 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 'ASC LIMIT 0, 5' at line 1 [] []
    [2019-01-15 10:53:13] Espo.ERROR: Display 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 'ASC LIMIT 0, 5' at line 1, Code: 42000 URL: /espocrm/api/v1/Vertrag/action/listKanban?select=vertragsnummer%2CappProjectId%2C appProjectName%2CaccountId%2CaccountName%2Cstatus& maxSize=5&offset=0&orderBy=vertagsnummer&order=asc [] []
    [2019-01-15 10:54:02] Espo.DEBUG: BPM: processPendingFlows [] []

  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello,
    add log print here https://github.com/espocrm/espocrm/b.../Base.php#L289
    also you can reset search, it could fix your view

    Comment

    Working...