1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

SQL statement for search utility

Discussion in 'Databases' started by t7584, Mar 8, 2006.

  1. #1
    I want to create a search utility and it's necessary to write SQL statement.

    Is this correct? - sSQL="SELECT * FROM r1 ORDER BY ID DESC WHERE r1.message LIKE '%" & strInputSearch & "%';"
    Or like this? - sSQL="SELECT * FROM r1 WHERE r1.message LIKE '%" & strInputSearch & "%' ORDER BY ID DESC;"
     
    t7584, Mar 8, 2006 IP
  2. vectorgraphx

    vectorgraphx Guest

    Messages:
    545
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    put your order by clause at the end, as in your second example.
     
    vectorgraphx, Mar 8, 2006 IP