List:General Discussion« Previous MessageNext Message »
From:mel list_php Date:February 23 2005 1:36pm
Subject:RE: SELECT ERROR
View as plain text  
If you want to compare the 2 tables you have to join them:
select * from listings, fake where listings.id=fake.id;
If you do your query SELECT * from listings where listings.id = fake.id; it 
simply doesn't know where to get fake.id


>From: Ed Curtis <ed@stripped>
>To: mysql@stripped
>Subject: SELECT ERROR
>Date: Wed, 23 Feb 2005 08:02:21 -0500 (EST)
>
>
>I'm trying to compare 2 tables and keep getting an error.
>
>SELECT * from listings where listings.id = fake.id;
>
>The error is "Error 1109: Unknown table 'fake' in where clause"
>or "Error 1109: Unknown table 'listings' in where clause" depending on
>the table order at the end of the query.
>
>Both tables do exist and I can select any or all contents from either of
>them seperately just not using the command above that practically comes
>straight from the documentation.
>
>Any ideas?
>
>Thanks,
>
>Ed
>
>
>
>--
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe:    
>http://lists.mysql.com/mysql?unsub=1
>

_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!  
http://toolbar.msn.co.uk/

Thread
SELECT ERROREd Curtis23 Feb
  • RE: SELECT ERRORmel list_php23 Feb
    • RE: SELECT ERROREd Curtis23 Feb