SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
Thread: WHERE clause and INNER JOIN
-
Oct 9, 2009, 18:02 #1
- Join Date
- Oct 2008
- Posts
- 372
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
WHERE clause and INNER JOIN
Hey,
I have this query:
Code MySQL:
if I remove the WHERE clause it works fine. Is there a way to define which userid1 I want? I don't want all of the data..
This is the error
Code:#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN customers ON friends . userid2 = customers . id LIMIT 0, 30' at line 1
-
Oct 9, 2009, 18:46 #2
- Join Date
- Sep 2009
- Location
- Melbourne, Australia
- Posts
- 228
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
The WHERE clause goes after the JOIN, not before
Bookmarks