When I try to get the Gantt charf for a proyect I get the following message: C:\\xampp\\htdocs\\web2project\\classes\\w2p\\Database\\Query.class.php(1139): query failed(SELECT pr.project_id, project_color_identifier, project_name, project_start_date, project_end_date, project_company, project_parent FROM ((`projects` AS pr)) 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 project_active = 1 AND project_id IN (46,40) GROUP BY pr.project_id ORDER BY project_name) - error was: Column 'project_id' in where clause is ambiguous If I try to get the chart using the admin account, there is no problema and the charts is drawn. The user has \"Allow ALL\" for that Project in particular, but no other permission. I can't find wich permission is needed o where is the error. BTW, there is no Project 40 in mi DB, the projects start at 41, the previus have been deleted I gUess. Any insight will be apreciated.

asked 06 May '15, 13:58

Stinkin's gravatar image

Stinkin
2271216
accept rate: 21%

edited 27 Oct '15, 09:32


***SOLVED !!!*** The issue was with security. At the user role I've set up:\n**Projects:All - Deny: View| Add|Edit | Delete** So they can't see the projects that weren't assigned to them At user level I've set up:\n**Projects:XXXX - Allow: View| Edit | Delete** So they get the permissions over one project at a time. -------------------------------------------------------------------------\n
\n****As soon as I removed the role restriction, the Gannt started working.****
permanent link

answered 27 Oct '15, 09:26

Stinkin's gravatar image

Stinkin
2271216
accept rate: 21%

answered 27 Oct '15, 09:26

A quick guess is that:\n\"WHERE project_active = 1 AND project_id IN (46,40) GROUP BY pr.project_id ORDER BY project_name)\" should be:\n\"WHERE project_active = 1 AND pr.project_id IN (46,40) GROUP BY pr.project_id ORDER BY project_name)\" because there is this:\"ON pr.project_id = project_departments.project_id\"(there are two [project_id] fields) Don't ask me how to fix it, I am not that knowledgeable about web2project, just a newbie...
permanent link

answered 07 May '15, 02:25

Themoulos's gravatar image

Themoulos ♦
217111622
accept rate: 22%

answered 07 May '15, 02:25

What's the url where you're seeing this error? You can leave off the domain portion.

(10 May '15, 18:19) caseydk ♦♦ caseydk's gravatar image
The URL is http://localhost/web2project/index.php?m=projects&a=view&project_id=46&tab=2 the full error is C:\\xampp\\htdocs\\web2project\\classes\\w2p\\Database\\Query.class.php(1139): query failed(SELECT pr.project_id, project_color_identifier, project_name, project_start_date, project_end_date, project_company, project_parent FROM ((`projects` AS pr)) 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 project_active = 1 AND project_id IN (46,40) GROUP BY pr.project_id ORDER BY project_name) - error was: Column 'project_id' in where clause is ambiguous
permanent link

answered 11 May '15, 07:28

Stinkin's gravatar image

Stinkin
2271216
accept rate: 21%

answered 11 May '15, 07:28

After some time, the project for projects server has resourfaced and I need this to be fixed. As themoulos wrote, the error is in WHERE project_active = 1 AND **pr.**project_id IN (46,40) GROUP BY pr.project_id ORDER BY project_name) where the **pr.** is missing. I've tried with 3.3.66 with no luck. Can someone point me in the right direction ?
permanent link

answered 02 Sep '15, 12:49

Stinkin's gravatar image

Stinkin
2271216
accept rate: 21%

answered 02 Sep '15, 12:49

this works on my 3.3.66 version (github opto) for admin and project worker. using php 5.5 and mysql 5.6 on win 7 (but I did not change that part of the code). Maybe if you re-download? Klaus
permanent link

answered 05 Sep '15, 17:03

opto's gravatar image

opto ♦
83343110131
accept rate: 10%

answered 05 Sep '15, 17:03

Re-downloaded it from GitHub. Tried both https://github.com/opto/web2project and https://github.com/web2project/web2project.

Did a clean install, just copied the config file from server and got the same error both times.

    \n
  • XAMPP for Windows 1.8.3
  • \n
  • Win 7 Pro SP1
  • \n
  • MySQL 5.6.21
  • \n
  • PHP 5.6.3
I will try reinstalling XAMPP, version 5.6.12. Thanks in advance...

![alt text][1] [1]: /storage/temp/284-noluck.png\n

permanent link

answered 09 Sep '15, 07:56

Stinkin's gravatar image

Stinkin
2271216
accept rate: 21%

edited 09 Sep '15, 08:03

I tried on xampp 5.5.
permanent link

answered 09 Sep '15, 08:32

opto's gravatar image

opto ♦
83343110131
accept rate: 10%

answered 09 Sep '15, 08:32

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:

×24
×7

question asked: 06 May '15, 13:58

question was seen: 1,070 times

last updated: 27 Oct '15, 09:32

powered by Bitnami OSQA