Problem with custom Query

Hi. I have custom entryPoint with this query -

SELECT count(DISTINCT aos_quotes.name) AS orderSum, users.user_name 
  FROM aos_quotes  
  LEFT JOIN users ON users.id = aos_quotes.assigned_user_id
  WHERE aos_quotes.date_entered  BETWEEN '2019-08-12 00:00:00' AND '2019-08-12 23:59:59' 
  AND assigned_user_id = '61edafdb-1f18-e3b6-d462-5c5aacc3d371'  AND aos_quotes.deleted = 0

Problem that this query returns 0, but if put in ‘assigned_user_id’ id of admin (i login as admin) than it show results. I check in database, this id ‘61edafdb-1f18-e3b6-d462-5c5aacc3d371’ has data in AOS_Quotes table.
So in custom query i cant get data from other user if i not login as that user?

If you’re using a direct SQL query no application-level security restrictions will apply.

You can try the same SQL from phpMyAdmin and the results should be the same.

It must be some other small issue, one of the other conditions, perhaps.

That the problem when i use this query in phpMyAdmin it shows me data.

Sorry, this only not working in testing version of Suite) On prom server works fine) Tnx for help pgr.

1 Like