If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Joining two tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-22-09, 19:08
Schweppesale Schweppesale is offline
Registered User
 
Join Date: Jun 2009
Posts: 33
Joining two tables

hi, I'm having trouble joining these two tables. Can someone point out my mistake?

Code:
$query = 'SELECT jos_keyword_keys.ID, jos_keyword_keys.Word, '
	.'jos_keyword_keys.ClientID, jos_keyword_keys.Destination, jos_keyword_keys.StartDate, '
	.'jos_keyword_keys.EndDate, jos_keyword_keys.StartTime, jos_keyword_keys.EndTime '
	.'jos_keyword_clients.Client, jos_keyword_clients.ID AS CID, jos_keyword_clients.Contact '
	.'FROM (jos_keyword_keys AND jos_keyword_clients) WHERE (CID = jos_keyword_keys.ClientID)';
	
	$query = mysql_query($query);

Last edited by Schweppesale; 06-22-09 at 19:12.
Reply With Quote
  #2 (permalink)  
Old 06-22-09, 19:21
Schweppesale Schweppesale is offline
Registered User
 
Join Date: Jun 2009
Posts: 33
nvm. i figured it out.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On