SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    derrrp
    Join Date
    Aug 2006
    Location
    earth
    Posts
    923
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SQL syntax error...why??

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OUTER JOIN events as e ON e.event_id = er.event_fk ORDER BY sort,team_leader DES' at line 1
    Code MySQL:
    SELECT er.er_id, er.team_company, er.title, er.name, er.lastname, er.sdate, er.assign_date, er.assigned_fk, er.team_leader, STRCMP(er.assigned_fk,0) AS sort, e.event_name, e.event_type, e.event_deadline, CURDATE() 
    FROM event_reg as er 
    OUTER JOIN events as e ON e.event_id = er.event_fk 
    ORDER BY sort,team_leader DESC,sdate,event_name,team_company LIMIT 0,20

    My eyes are missing the syntax error...could I get some help on what it is?

    Thanks!
    No, I REALLY dislike having to use Joomla.

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,336
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    you are missing one of these three words: LEFT, RIGHT, or FULL

    the word OUTER is optional, the word that goes in front of it isn't

    actually FULL OUTER JOIN doesn't work in mysql, so you have to pick between LEFT and RIGHT
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    derrrp
    Join Date
    Aug 2006
    Location
    earth
    Posts
    923
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you!
    No, I REALLY dislike having to use Joomla.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •