Jump to content


mysql select help

  • Please log in to reply
1 reply to this topic

#1 DylanBlitz

  • Members
  • PipPipPip
  • Advanced Member
  • 99 posts
  • LocationOC Baby!

Posted 24 January 2003 - 10:52 PM

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

#2 effigy

  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 25 January 2003 - 12:20 AM

mysql does not (yet) support subqueries, just break them apart and use php to piece them together.
Regexp | Unicode Article | Letter Database

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users