SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    936
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    What's wrong with my SELECT? (basic)

    Hi guys,

    I have error in my SELECT query.
    Code:
    $query = $this->db->query("SELECT classid, nameclass FROM classes WHERE pathwayid = $pathwayid ORDER BY nameclass ASC");
    And the error was,
    Code:
    Error Number: 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 'ORDER BY nameclass ASC' at line 1
    I know the error is very basic, Sorry but I forgot...

    Thanks in advance.
    Quality codes are optimized and tested...
    Click here for inspiration..

  2. #2
    Patience... bronze trophy solidcodes's Avatar
    Join Date
    Jul 2006
    Location
    Philippines
    Posts
    936
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    The codes above is correct.
    I forgot to put the $pathwayid into session.

    Problem solved!
    Quality codes are optimized and tested...
    Click here for inspiration..


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
  •