Results 1 to 6 of 6

Thread: MySQL GROUP BY *RESOLVED*

Threaded View

  1. #1

    Thread Starter
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    MySQL GROUP BY *RESOLVED*

    I can't see why the following SELECT statement won't work - any ideas?

    Code:
    SELECT				s.subject_id, s.subject_name
    FROM				tbl_subjects AS s
    INNER JOIN			tbl_lessons AS l
    ON				s.subject_id = l.subject_id
    WHERE 				l.online = 'True'
    GROUP BY			s.subject_id, s.subject_name
    ORDER BY			s.subject_name ASC
    The error I get is:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

    [MySQL][ODBC 3.51 Driver][mysqld-3.23.55-nt]You have an error in your SQL syntax near 'BY s.subject_name ASC' at line 1

    /html/newLogin.asp, line 23


    Stumped again...

    DJ
    Last edited by dj4uk; Jul 13th, 2005 at 05:15 AM.

    If I have been helpful please rate my post. If I haven't tell me!

Posting Permissions

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



Click Here to Expand Forum to Full Width