HighDots Forums  

data from 2 tables

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss data from 2 tables in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
jsteinmann
 
Posts: n/a

Default data from 2 tables - 06-10-2008 , 01:14 PM






data in recordset is from two tables
is this a valid statement?:
if (isset($row['table1.education']) != "") {
$query .= " WHERE table1.desiredcountry LIKE '{$row['table2.desiredcountry']}'";
}


Reply With Quote
  #2  
Old   
jsteinmann
 
Posts: n/a

Default Re: data from 2 tables - 06-10-2008 , 01:36 PM






how can I distinguish between table 1 and table 2 since they have the same name?

Reply With Quote
  #3  
Old   
jsteinmann
 
Posts: n/a

Default Re: data from 2 tables - 06-10-2008 , 01:36 PM



how can I distinguish between table 1 and table 2 since they have the same name?

Reply With Quote
  #4  
Old   
bregent
 
Posts: n/a

Default Re: data from 2 tables - 06-10-2008 , 03:30 PM



Sorry, I didn't complete the last thought. First of all, I don't know php so
I'm not sure what the $row before the table2.desiredcountry is for. If you are
looking for an exact match between the two tables, then you should not be using
a LIKE operator. Either join the tables in the Where clause using the =
operator, or put them in the join condition in the From clause.
But distinguishing same name columns by qualifying with the table name is
correct.


Reply With Quote
  #5  
Old   
bregent
 
Posts: n/a

Default Re: data from 2 tables - 06-10-2008 , 03:30 PM



Sorry, I didn't complete the last thought. First of all, I don't know php so
I'm not sure what the $row before the table2.desiredcountry is for. If you are
looking for an exact match between the two tables, then you should not be using
a LIKE operator. Either join the tables in the Where clause using the =
operator, or put them in the join condition in the From clause.
But distinguishing same name columns by qualifying with the table name is
correct.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.