Jump to content

Archived

This topic is now archived and is closed to further replies.

DylanBlitz

mysql select help

Recommended Posts

Can anyone tell me how to make this SQL query mysql friendly?

 

select names.name_id, names.name, test.test_id from names INNER JOIN test ON names.name_id = test.name_id WHERE (names.used = 1 AND (test.test_id NOT IN(select distinct test_id from auth))) ORDER BY names.name

 

 

I get the error:

 

You have an error in your SQL syntax near \'select DISTINCT boob_id FROM auth))) ORDER BY names.name LIMIT 0, 30\' at line 1

 

I have the database in both SQL and mysql and it works in sql, just not in mysql, don\'t know if you can do what I\'m trying to do in mysql.

 

Much appreciated :)

Share this post


Link to post
Share on other sites

mysql does not (yet) support subqueries, just break them apart and use php to piece them together.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.