When I click on Menu Company -> Project I have the following error /var/www/html/pms/classes/w2p/Database/Query.class.php(1138): query failed(SELECT DISTINCT pr.project_id, pr.*, contact_first_name, contact_last_name, contact_display_name as contact_name, contact_display_name as project_owner, contact_display_name as user_username, user_id FROM ((`projects` AS pr)) LEFT JOIN `users` AS u ON u.user_id = pr.project_owner LEFT JOIN `contacts` AS con ON u.user_contact = con.contact_id LEFT JOIN `project_departments` AS project_departments ON pr.project_id = project_departments.project_id LEFT JOIN `departments` AS dep ON dep.dept_id=project_departments.department_id WHERE pr.project_company = 1 AND project_company IN (1) AND project_id IN (1) AND pr.project_company IN (1) AND pr.project_active = 1 ORDER BY project_name) - **error was: Column 'project_id' in where clause is ambiguous**

asked 28 Mar '14, 07:09

dnpp.alias's gravatar image

dnpp.alias
6122
accept rate: 0%

asked 28 Mar '14, 07:09


After debugging this error I made the following Patch: modules/companies/companies.class.php: 165 $q = $projObj->setAllowedSQL($AppUI->user_id, $q, null, 'pr'); Change the line to $q = $projObj->setAllowedSQL($AppUI->user_id, $q, 'pr.project_id'); Please advise. Thanks,\nDP
permanent link

answered 28 Mar '14, 07:12

dnpp.alias's gravatar image

dnpp.alias
6122
accept rate: 0%

answered 28 Mar '14, 07:12

That looks like a good patch. I'll keep an eye out to see if we need to do the same in the latest development.

(30 Mar '14, 16:46) caseydk ♦♦ caseydk's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×25
×10
×1
×1

question asked: 28 Mar '14, 07:09

question was seen: 332 times

last updated: 30 Mar '14, 16:46

powered by Bitnami OSQA