List:MySQL and Perl« Previous MessageNext Message »
From:Werner Otto Date:June 9 2004 3:11pm
Subject:Joining
View as plain text  
Hi there,

I need some help regarding a select statement. I need to be able to 
reference one tables values from another where there a field in common:

Example

Table 1
Fields
Fields
MY_Field

Table 2
Fields
My_Field

my select statement looks like:
select * from Table1,Table2 where Table1.My_Field=Table2.MyField; On the 
command line it seems to work a 100% but not in my perl script if meniones 
that the bind colums specified are less than required. I have the same 
example which works. So this leads me to believe that my table definitions 
are somehow now 100%. Do I need Keys and Foreign keys specified in my 
table definition for this type of query?

-- 
Kind Regards,
Thread
JoiningWerner Otto9 Jun