Jump to content

mysql select help


DylanBlitz

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 :)

Link to comment
https://forums.phpfreaks.com/topic/91-mysql-select-help/
Share on other sites

Archived

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

×
×
  • Create New...

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.