Unknown column 'Projects1.id' in 'on clause'

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
omackeytech
Veteran Member
Posts: 35
Joined: 2014-06-04 13:18

Unknown column 'Projects1.id' in 'on clause'

Post by omackeytech » 2016-03-25 15:00

I have no table in my database called Projects1.
I get this error when I try to create a look up field based on my Projects Table.
I have two forms that use this look up field and both generate the same error.
If I remove the look up reference and generate the code the error goes away.
No error appears in the php error_log or mysql logs.
This used to work, when I upgraded so I could use the Search Page Maker and regenerated the code the problem began.
It appears to be coming either from these lines of code in incCommon.php

Line 158: 'Time_Entry' => "`Time_Entry` LEFT JOIN `Projects` as Projects1 ON `Projects1`.`id`=`Time_Entry`.`Project` ",
Line 159: 'Expenses' => "`Expenses` LEFT JOIN `Projects` as Projects1 ON `Projects1`.`id`=`Expenses`.`Project` ",

Or in this line in Time_Entry_view.php and Expences_view.php.

Line 79: $x->QueryFrom="`Time_Entry` LEFT JOIN `Projects` as Projects1 ON `Projects1`.`id`=`Time_Entry`.`Project` ";
Line 87: $x->QueryFrom="`Expenses` LEFT JOIN `Projects` as Projects1 ON `Projects1`.`id`=`Expenses`.`Project` ";

Any idea what is going on?

Thank you,
Brian

Post Reply