Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Forums
Blogs
Articles
Groups
Galleries
Member List
Calendar
Home
Forum
Simply Business
Fucking Around & Business Discussion
WTH is wrong with this MySql statement?
WTH is wrong with this MySql statement?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
alex79
Confirmed User
Join Date:
Jun 2002
Posts:
996
Share
Post
#1
WTH is wrong with this MySql statement?
10-18-2006, 09:14 AM
Code:
SELECT id FROM `table1` WHERE id NOT IN ( SELECT id FROM `table2` )
i get an
#1064 - You have an error in your SQL syntax near 'SELECT id FROM `table1`
error message
FuqALot
Confirmed User
Join Date:
Dec 2001
Posts:
3817
Share
Post
#2
10-18-2006, 09:28 AM
try `table1` without quotes, and `table2` without quotes too.
and fyi, u need a pretty new mysql version to use query with query.. but first u should try without the quote.
Comment
Post
Cancel
psili
Confirmed User
Join Date:
Apr 2003
Posts:
5526
Share
Post
#3
10-18-2006, 09:32 AM
You could try:
SELECT id FROM table1 LEFT JOIN table2 WHERE table2.id IS NULL
Your post count means nothing.
Comment
Post
Cancel
CaptainHowdy
Too lazy to set a custom title
Join Date:
Dec 2004
Posts:
94735
Share
Post
#4
10-18-2006, 09:37 AM
Originally posted by
psili
You could try:
SELECT id FROM table1 LEFT JOIN table2 WHERE table2.id IS NULL
!!
YOUR AD HERE!
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎
☕
Comment