Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009
    Posts
    33

    Unanswered: Left Join returning a Syntax Error

    was wondering what's wrong with the following code phpmyadmin is returning "#1064 - 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 'LEFT JOIN jos_jt_banner_clicks ON (jos_jt_banners.id = jos_jt_banner' at line 11"

    Code:
    SELECT jos_jt_banners.id
                    , jos_jt_banners.title
                    , jos_jt_banners.img_location
                    , jos_jt_banners.impressions
                    , jos_jt_banners.start_date
                    , jos_jt_banners.expiration_date
                    , jos_jt_banners.published
                    , jos_jt_banners.finished
                    , jos_jt_banner_clicks.id
                    , jos_jt_banner_clicks.banner_id
                LEFT JOIN jos_jt_banner_clicks ON
               (jos_jt_banners.id = jos_jt_banner_clicks.banner_id)

  2. #2
    Join Date
    Jun 2009
    Posts
    33
    doh, I forgot to use FROM

Posting Permissions

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