Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-18-2006, 10:14 AM   #1
alex79
Confirmed User
 
Join Date: Jun 2002
Location: france
Posts: 996
:mad WTH is wrong with this MySql statement?

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
__________________
alex79 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-18-2006, 10:28 AM   #2
FuqALot
Confirmed User
 
Join Date: Dec 2001
Location: Malibu
Posts: 3,817
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.
FuqALot is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-18-2006, 10:32 AM   #3
psili
Confirmed User
 
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
You could try:

SELECT id FROM table1 LEFT JOIN table2 WHERE table2.id IS NULL
__________________
Your post count means nothing.
psili is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-18-2006, 10:37 AM   #4
CaptainHowdy
Too lazy to set a custom title
 
Industry Role:
Join Date: Dec 2004
Location: Happy in the dark.
Posts: 94,195
Quote:
Originally Posted by psili View Post
You could try:

SELECT id FROM table1 LEFT JOIN table2 WHERE table2.id IS NULL
!!
__________________
Vacares - Web Hosting, Domains, O365, Security & More - Paxum and BTC Accepted

Windows VPS now available
Great for TSS, Nifty Stats, remote work, virtual assistants, etc.
CaptainHowdy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.