Need to run SQL queries. What is best way?
the Sugar Cloud Policy Guide does not allow to run own SQL statements in custom modules.
That includes php mysql clients like phpmyadmin or phpminiadmin.
The only possiblity to run own sql statements against the cloud database is Advanced Reporting in Enterprise and Ultimate edition. That's because Advanced Reporting is filtering the SQL statements and allows SELECT statements only.
The reason seems clear, you could destroy your databse with one wrong statement and that is not acceptable, for any provider of cloud databases.
One small addition to Harald's comment, as described in the Sugar Cloud Policy Guide UPDATE, INSERT, DELETE, and/or TRUNCATE statements can be run by SugarCRM Support by opening a support case.
Just a thought, and probably overkill, but since you only have access to the DB through the application, and you are only wanting to query the system - not modify it - you could maybe build yourself a custom API
that runs the query you need using a
or Prepared Statement
Use of prepared statements in Sugar 7.9
Retrieving data ...