Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column 'task_id' in where clause is ambiguous #58

Open
tjq99tjq opened this Issue Apr 8, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@tjq99tjq
Copy link

tjq99tjq commented Apr 8, 2019

Hi,
When set deny role for task,Display the following error。
ERROR: C:\xampp\htdocs\meipeng\includes\db_adodb.php(69): Error executing: SELECT distinct tsk.task_id, task_parent, task_name, task_start_date, task_end_date, task_dynamic, task_pinned, pin.user_id as pin_user, task_priority, task_percent_complete, task_duration, task_duration_type, task_project, task_description, task_owner, task_status, usernames.user_username, usernames.user_id, task_milestone, assignees.user_username as assignee_username, count(distinct assignees.user_id) as assignee_count, co.contact_first_name, co.contact_last_name, count(distinct fi.file_task) as file_count, if (tlog.task_log_problem IS NULL, 0, tlog.task_log_problem) AS task_log_problem FROM (dotp_tasks as tsk) LEFT JOIN dotp_projects as prj ON project_id = task_project LEFT JOIN dotp_users as usernames ON task_owner = usernames.user_id LEFT JOIN dotp_user_tasks as ut ON ut.task_id = tsk.task_id LEFT JOIN dotp_users as assignees ON assignees.user_id = ut.user_id LEFT JOIN dotp_contacts as co ON co.contact_id = usernames.user_contact LEFT JOIN dotp_task_log AS tlog ON tlog.task_log_task = tsk.task_id AND tlog.task_log_problem > 0 LEFT JOIN dotp_files as fi on tsk.task_id = fi.file_task LEFT JOIN dotp_user_task_pin as pin ON tsk.task_id = pin.task_id AND pin.user_id = 52 WHERE task_project = 27 AND task_status = 0 AND project_company IN (1) AND task_id NOT IN (616) AND task_parent NOT IN (616) GROUP BY task_id ORDER BY project_id, task_start_date (Column 'task_id' in where clause is ambiguous) Backtrace: 0 C:\xampp\htdocs\meipeng\includes\db_adodb.php:69 dprint('C:\xampp\htdocs\meipeng\includes\db_adodb.php',69,0,'Error executing: SELECT distinct tsk.task_id, task_parent, task_name, task_start_date, task_end_date, task_dynamic, task_pinned, pin.user_id as pin_user, task_priority, task_percent_complete, task_duration, task_duration_type, task_project, task_description, task_owner, task_status, usernames.user_username, usernames.user_id, task_milestone, assignees.user_username as assignee_username, count(distinct assignees.user_id) as assignee_count, co.contact_first_name, co.contact_last_name, count(distinct fi.file_task) as file_count, if (tlog.task_log_problem IS NULL, 0, tlog.task_log_problem) AS task_log_problem FROM (dotp_tasks as tsk) LEFT JOIN dotp_projects as prj ON project_id = task_project LEFT JOIN dotp_users as usernames ON task_owner = usernames.user_id LEFT JOIN dotp_user_tasks as ut ON ut.task_id = tsk.task_id LEFT JOIN dotp_users as assignees ON assignees.user_id = ut.user_id LEFT JOIN dotp_contacts as co ON co.contact_id = usernames.user_contact LEFT JOIN dotp_task_log AS tlog ON tlog.task_log_task = tsk.task_id AND tlog.task_log_problem > 0 LEFT JOIN dotp_files as fi on tsk.task_id = fi.file_task LEFT JOIN dotp_user_task_pin as pin ON tsk.task_id = pin.task_id AND pin.user_id = 52 WHERE task_project = 27 AND task_status = 0 AND project_company IN (1) AND task_id NOT IN (616) AND task_parent NOT IN (616) GROUP BY task_id ORDER BY project_id, task_start_date (Column 'task_id' in where clause is ambiguous)') 1 C:\xampp\htdocs\meipeng\modules\tasks\tasks.php:316 db_exec('SELECT distinct tsk.task_id, task_parent, task_name, task_start_date, task_end_date, task_dynamic, task_pinned, pin.user_id as pin_user, task_priority, task_percent_complete, task_duration, task_duration_type, task_project, task_description, task_owner, task_status, usernames.user_username, usernames.user_id, task_milestone, assignees.user_username as assignee_username, count(distinct assignees.user_id) as assignee_count, co.contact_first_name, co.contact_last_name, count(distinct fi.file_task) as file_count, if (tlog.task_log_problem IS NULL, 0, tlog.task_log_problem) AS task_log_problem FROM (dotp_tasks as tsk) LEFT JOIN dotp_projects as prj ON project_id = task_project LEFT JOIN dotp_users as usernames ON task_owner = usernames.user_id LEFT JOIN dotp_user_tasks as ut ON ut.task_id = tsk.task_id LEFT JOIN dotp_users as assignees ON assignees.user_id = ut.user_id LEFT JOIN dotp_contacts as co ON co.contact_id = usernames.user_contact LEFT JOIN dotp_task_log AS tlog ON tlog.task_log_task = tsk.task_id AND tlog.task_log_problem > 0 LEFT JOIN dotp_files as fi on tsk.task_id = fi.file_task LEFT JOIN dotp_user_task_pin as pin ON tsk.task_id = pin.task_id AND pin.user_id = 52 WHERE task_project = 27 AND task_status = 0 AND project_company IN (1) AND task_id NOT IN (616) AND task_parent NOT IN (616) GROUP BY task_id ORDER BY project_id, task_start_date') 2 C:\xampp\htdocs\meipeng\style\default\overrides.php:95 require('C:\xampp\htdocs\meipeng\modules\tasks\tasks.php') 3 C:\xampp\htdocs\meipeng\modules\projects\view.php:481 show() 4 C:\xampp\htdocs\meipeng\index.php:301 require('C:\xampp\htdocs\meipeng\modules\projects\view.php') <\pre> Column 'task_id' in where clause is ambiguous | ERROR: C:\xampp\htdocs\meipeng\includes\db_adodb.php(69): Error executing: SELECT distinct tsk.task_id, task_parent, task_name, task_start_date, task_end_date, task_dynamic, task_pinned, pin.user_id as pin_user, task_priority, task_percent_complete, task_duration, task_duration_type, task_project, task_description, task_owner, task_status, usernames.user_username, usernames.user_id, task_milestone, assignees.user_username as assignee_username, count(distinct assignees.user_id) as assignee_count, co.contact_first_name, co.contact_last_name, count(distinct fi.file_task) as file_count, if (tlog.task_log_problem IS NULL, 0, tlog.task_log_problem) AS task_log_problem FROM (dotp_tasks as tsk) LEFT JOIN dotp_projects as prj ON project_id = task_project LEFT JOIN dotp_users as usernames ON task_owner = usernames.user_id LEFT JOIN dotp_user_tasks as ut ON ut.task_id = tsk.task_id LEFT JOIN dotp_users as assignees ON assignees.user_id = ut.user_id LEFT JOIN dotp_contacts as co ON co.contact_id = usernames.user_contact LEFT JOIN dotp_task_log AS tlog ON tlog.task_log_task = tsk.task_id AND tlog.task_log_problem > 0 LEFT JOIN dotp_files as fi on tsk.task_id = fi.file_task LEFT JOIN dotp_user_task_pin as pin ON tsk.task_id = pin.task_id AND pin.user_id = 52 WHERE task_project = 27 AND task_status = 0 AND project_company IN (1) AND task_id NOT IN (616) AND task_parent NOT IN (616) GROUP BY task_id ORDER BY project_id, task_start_date (Column 'task_id' in where clause is ambiguous) Backtrace: 0 C:\xampp\htdocs\meipeng\includes\db_adodb.php:69 dprint('C:\xampp\htdocs\meipeng\includes\db_adodb.php',69,0,'Error executing: SELECT distinct tsk.task_id, task_parent, task_name, task_start_date, task_end_date, task_dynamic, task_pinned, pin.user_id as pin_user, task_priority, task_percent_complete, task_duration, task_duration_type, task_project, task_description, task_owner, task_status, usernames.user_username, usernames.user_id, task_milestone, assignees.user_username as assignee_username, count(distinct assignees.user_id) as assignee_count, co.contact_first_name, co.contact_last_name, count(distinct fi.file_task) as file_count, if (tlog.task_log_problem IS NULL, 0, tlog.task_log_problem) AS task_log_problem FROM (dotp_tasks as tsk) LEFT JOIN dotp_projects as prj ON project_id = task_project LEFT JOIN dotp_users as usernames ON task_owner = usernames.user_id LEFT JOIN dotp_user_tasks as ut ON ut.task_id = tsk.task_id LEFT JOIN dotp_users as assignees ON assignees.user_id = ut.user_id LEFT JOIN dotp_contacts as co ON co.contact_id = usernames.user_contact LEFT JOIN dotp_task_log AS tlog ON tlog.task_log_task = tsk.task_id AND tlog.task_log_problem > 0 LEFT JOIN dotp_files as fi on tsk.task_id = fi.file_task LEFT JOIN dotp_user_task_pin as pin ON tsk.task_id = pin.task_id AND pin.user_id = 52 WHERE task_project = 27 AND task_status = 0 AND project_company IN (1) AND task_id NOT IN (616) AND task_parent NOT IN (616) GROUP BY task_id ORDER BY project_id, task_start_date (Column 'task_id' in where clause is ambiguous)') 1 C:\xampp\htdocs\meipeng\modules\tasks\tasks.php:316 db_exec('SELECT distinct tsk.task_id, task_parent, task_name, task_start_date, task_end_date, task_dynamic, task_pinned, pin.user_id as pin_user, task_priority, task_percent_complete, task_duration, task_duration_type, task_project, task_description, task_owner, task_status, usernames.user_username, usernames.user_id, task_milestone, assignees.user_username as assignee_username, count(distinct assignees.user_id) as assignee_count, co.contact_first_name, co.contact_last_name, count(distinct fi.file_task) as file_count, if (tlog.task_log_problem IS NULL, 0, tlog.task_log_problem) AS task_log_problem FROM (dotp_tasks as tsk) LEFT JOIN dotp_projects as prj ON project_id = task_project LEFT JOIN dotp_users as usernames ON task_owner = usernames.user_id LEFT JOIN dotp_user_tasks as ut ON ut.task_id = tsk.task_id LEFT JOIN dotp_users as assignees ON assignees.user_id = ut.user_id LEFT JOIN dotp_contacts as co ON co.contact_id = usernames.user_contact LEFT JOIN dotp_task_log AS tlog ON tlog.task_log_task = tsk.task_id AND tlog.task_log_problem > 0 LEFT JOIN dotp_files as fi on tsk.task_id = fi.file_task LEFT JOIN dotp_user_task_pin as pin ON tsk.task_id = pin.task_id AND pin.user_id = 52 WHERE task_project = 27 AND task_status = 0 AND project_company IN (1) AND task_id NOT IN (616) AND task_parent NOT IN (616) GROUP BY task_id ORDER BY project_id, task_start_date') 2 C:\xampp\htdocs\meipeng\style\default\overrides.php:95 require('C:\xampp\htdocs\meipeng\modules\tasks\tasks.php') 3 C:\xampp\htdocs\meipeng\modules\projects\view.php:481 show() 4 C:\xampp\htdocs\meipeng\index.php:301 require('C:\xampp\htdocs\meipeng\modules\projects\view.php') <\pre> Column 'task_id' in where clause is ambiguous
-- | --
ERROR: C:\xampp\htdocs\meipeng\includes\db_adodb.php(69): Error executing: SELECT distinct tsk.task_id, task_parent, task_name, task_start_date, task_end_date, task_dynamic, task_pinned, pin.user_id as pin_user, task_priority, task_percent_complete, task_duration, task_duration_type, task_project, task_description, task_owner, task_status, usernames.user_username, usernames.user_id, task_milestone, assignees.user_username as assignee_username, count(distinct assignees.user_id) as assignee_count, co.contact_first_name, co.contact_last_name, count(distinct fi.file_task) as file_count, if (tlog.task_log_problem IS NULL, 0, tlog.task_log_problem) AS task_log_problem FROM (dotp_tasks as tsk) LEFT JOIN dotp_projects as prj ON project_id = task_project LEFT JOIN dotp_users as usernames ON task_owner = usernames.user_id LEFT JOIN dotp_user_tasks as ut ON ut.task_id = tsk.task_id LEFT JOIN dotp_users as assignees ON assignees.user_id = ut.user_id LEFT JOIN dotp_contacts as co ON co.contact_id = usernames.user_contact LEFT JOIN dotp_task_log AS tlog ON tlog.task_log_task = tsk.task_id AND tlog.task_log_problem > 0 LEFT JOIN dotp_files as fi on tsk.task_id = fi.file_task LEFT JOIN dotp_user_task_pin as pin ON tsk.task_id = pin.task_id AND pin.user_id = 52 WHERE task_project = 27 AND task_status = 0 AND project_company IN (1) AND task_id NOT IN (616) AND task_parent NOT IN (616) GROUP BY task_id ORDER BY project_id, task_start_date (Column 'task_id' in where clause is ambiguous) Backtrace: 0 C:\xampp\htdocs\meipeng\includes\db_adodb.php:69 dprint('C:\xampp\htdocs\meipeng\includes\db_adodb.php',69,0,'Error executing: SELECT distinct tsk.task_id, task_parent, task_name, task_start_date, task_end_date, task_dynamic, task_pinned, pin.user_id as pin_user, task_priority, task_percent_complete, task_duration, task_duration_type, task_project, task_description, task_owner, task_status, usernames.user_username, usernames.user_id, task_milestone, assignees.user_username as assignee_username, count(distinct assignees.user_id) as assignee_count, co.contact_first_name, co.contact_last_name, count(distinct fi.file_task) as file_count, if (tlog.task_log_problem IS NULL, 0, tlog.task_log_problem) AS task_log_problem FROM (dotp_tasks as tsk) LEFT JOIN dotp_projects as prj ON project_id = task_project LEFT JOIN dotp_users as usernames ON task_owner = usernames.user_id LEFT JOIN dotp_user_tasks as ut ON ut.task_id = tsk.task_id LEFT JOIN dotp_users as assignees ON assignees.user_id = ut.user_id LEFT JOIN dotp_contacts as co ON co.contact_id = usernames.user_contact LEFT JOIN dotp_task_log AS tlog ON tlog.task_log_task = tsk.task_id AND tlog.task_log_problem > 0 LEFT JOIN dotp_files as fi on tsk.task_id = fi.file_task LEFT JOIN dotp_user_task_pin as pin ON tsk.task_id = pin.task_id AND pin.user_id = 52 WHERE task_project = 27 AND task_status = 0 AND project_company IN (1) AND task_id NOT IN (616) AND task_parent NOT IN (616) GROUP BY task_id ORDER BY project_id, task_start_date (Column 'task_id' in where clause is ambiguous)') 1 C:\xampp\htdocs\meipeng\modules\tasks\tasks.php:316 db_exec('SELECT distinct tsk.task_id, task_parent, task_name, task_start_date, task_end_date, task_dynamic, task_pinned, pin.user_id as pin_user, task_priority, task_percent_complete, task_duration, task_duration_type, task_project, task_description, task_owner, task_status, usernames.user_username, usernames.user_id, task_milestone, assignees.user_username as assignee_username, count(distinct assignees.user_id) as assignee_count, co.contact_first_name, co.contact_last_name, count(distinct fi.file_task) as file_count, if (tlog.task_log_problem IS NULL, 0, tlog.task_log_problem) AS task_log_problem FROM (dotp_tasks as tsk) LEFT JOIN dotp_projects as prj ON project_id = task_project LEFT JOIN dotp_users as usernames ON task_owner = usernames.user_id LEFT JOIN dotp_user_tasks as ut ON ut.task_id = tsk.task_id LEFT JOIN dotp_users as assignees ON assignees.user_id = ut.user_id LEFT JOIN dotp_contacts as co ON co.contact_id = usernames.user_contact LEFT JOIN dotp_task_log AS tlog ON tlog.task_log_task = tsk.task_id AND tlog.task_log_problem > 0 LEFT JOIN dotp_files as fi on tsk.task_id = fi.file_task LEFT JOIN dotp_user_task_pin as pin ON tsk.task_id = pin.task_id AND pin.user_id = 52 WHERE task_project = 27 AND task_status = 0 AND project_company IN (1) AND task_id NOT IN (616) AND task_parent NOT IN (616) GROUP BY task_id ORDER BY project_id, task_start_date') 2 C:\xampp\htdocs\meipeng\style\default\overrides.php:95 require('C:\xampp\htdocs\meipeng\modules\tasks\tasks.php') 3 C:\xampp\htdocs\meipeng\modules\projects\view.php:481 show() 4 C:\xampp\htdocs\meipeng\index.php:301 require('C:\xampp\htdocs\meipeng\modules\projects\view.php') <\pre> Column 'task_id' in where clause is ambiguous

@ajdonnison

This comment has been minimized.

Copy link
Contributor

ajdonnison commented Apr 8, 2019

Can you verify what version of dotProject you are using? The line numbers don't match up with what I'd expect.

ajdonnison added a commit that referenced this issue Apr 9, 2019

@ajdonnison

This comment has been minimized.

Copy link
Contributor

ajdonnison commented Apr 9, 2019

This should now be fixed in the latest devel branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.