This topic is locked

MySql newbie problem

7/2/2005 9:35:20 AM
PHPRunner General questions
B
botts author

I am trying to join two tables with all elements of both tables using the following statement:
select from `results`

join `roster` on results.lydid=roster.lydid
There are no master-detail relationships set ...
After building and loading I get the following error message.
select
from `results` join `roster` on results.lydid=roster.lydid where `lydid`=1 and `rdate`='2005-01-07'
I realize the 'where' statement is causing the problem ... but I did not specify any where in my query ...
HELP !!!!!!

Sergey Kornilov admin 7/4/2005

Hi,
the query fails because you have two "lydid" columns in one query.

You can rename lydid column in roster or resultstable and then modify your query to get it work.
"Where" clause is added to your query to select a particular record when you open view or edit page.