SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: syntax error?

Hybrid View

  1. #1
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    syntax error?

    Hey all! Im getting a sntax error and I dont know why?

    $sql -> Query ("SELECT * FROM news WHERE upper(news) like '%$query%' ORDER BY id DESC");

    Id give you more info, but I never made the script, Im just transporting it from one domain to another and Im having problems... who ever made it though.. im gonna kill didnt comment a single line

    thanx

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are the spaces between $sql and -> and Query supposed to be there? If so that is what is causing the error most likely, because the query looks okay.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually it was a parse..not a syntax error

  4. #4
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So was that the problem and if so I can stop fooling around finding you a solution, or shall i keep it up? It would benefit everyone if you would let us know what works and what doesn't. That way we can efficiently repsond to other posts if your problem has been solved.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  5. #5
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No it wasnt... since it is a parse error I think the problem may lie somewhere else. Im going through the source right now to see if I can find a missing comma or something like that


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
  •