Record Retrieval error SQL Syntax?

My admin account runs fine. I then created a sales account and role. When they login, the program runs fine but there are constant retrieving errors. Here is what the error log reports. I spoke to my server host who pointed out that they are using SQL 8, which should be compatible with SuiteCRM 8.4. Any idea what i might be able to change in permissions?

If i could just turn off the error that would be fine too for now.

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 β€˜DESC LIMIT 0,21’ at line 12
Wed Sep 13 12:24:36 2023 [3518639][66a8a744-ad09-d40f-9db3-6500c57e361a][FATAL] Mysqli_query failed.
Wed Sep 13 12:24:36 2023 [3518639][66a8a744-ad09-d40f-9db3-6500c57e361a][FATAL] Query Failed: SELECT opportunities.sales_stage, SUM(opportunities.amount_usdollar) as amount_usdollar FROM opportunities LEFT JOIN opportunities_cstm ON opportunities.id = opportunities_cstm.id_c LEFT JOIN users jt0 ON opportunities.modified_user_id=jt0.id AND jt0.deleted=0

AND jt0.deleted=0 LEFT JOIN users jt1 ON opportunities.created_by=jt1.id AND jt1.deleted=0

AND jt1.deleted=0 LEFT JOIN users jt2 ON opportunities.assigned_user_id=jt2.id AND jt2.deleted=0

AND jt2.deleted=0 LEFT JOIN accounts_opportunities jtl3 ON opportunities.id=jtl3.opportunity_id AND jtl3.deleted=0

LEFT JOIN accounts accounts ON accounts.id=jtl3.account_id AND accounts.deleted=0
AND accounts.deleted=0 LEFT JOIN campaigns jt4 ON opportunities.campaign_id=jt4.id AND jt4.deleted=0

AND jt4.deleted=0 where opportunities.deleted=0 AND opportunities.amount_usdollar is not null AND opportunities.sales_stage is not null GROUP BY opportunities.sales_stage DESC LIMIT 0,21: MySQL error 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 β€˜DESC LIMIT 0,21’ at line 12

Are you inside the Matrix?

What exact versions to do you have of

  • SuiteCRM
  • PHP
  • MySQL

?

Yes. I changed some of the module restrictions at the role level and was able to get the error messages to stop. It had to do with errors in relationships after closing certain areas of the websites. At least, thats what fixed it.

1 Like

Can you walk me through the steps you took to resolve this error?