Jump to content

MySQL Inner Join Query...

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts
Why does this not work on Linux MySQL but works fine on Windows MySQL?


SELECT  * 

FROM quick

INNER  JOIN sites_sit

WHERE quick.id = 506 AND quick.idsit_site_ned = sites_sit.id_sit



#2
Paradine

Paradine

    Learning Programmer

  • Members
  • PipPipPip
  • 48 posts
Try removing the inner join and putting just a comma between the two tables. This is short-hand. It may work.

#3
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts
Worked! Thanks!

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Standard SQL would be:
SELECT  * 
FROM quick
INNER  JOIN sites_sit
on (quick.idsit_site_ned = sites_sit.id_sit)
WHERE quick.id = 506 

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog