justsomeguy Posted August 5, 2015 Share Posted August 5, 2015 What database are you using? I'm not sure about "select top 10 * mproblem", that seems like it would be an error. For the filtering issue, you're not getting the search term correctly, pay attention to what you're doing. Link to comment Share on other sites More sharing options...
ahill Posted August 6, 2015 Author Share Posted August 6, 2015 (edited) its pulling from my advancedtrouble table in my test database. I had the top 10 * in yesterday by mistake when I posted. It dose not make any noticeable impact though..For the term it should be referencing my database and changing on input of a character. only thing I am confused with is they haveterm = Replace( Trim(Request("word")), "'", "''" )SQL = "select top 10 * mproblem from DBtable where mproblem like '%" & term & "%'"---------------------------------------------------------------------------------------------shouldn't it be something more likeSQL= "select mproblem from DBtable where mproblem like '% %' or mproblem like '"+ term +"'"ORSQL = " select mproblem from DBtable where mproblem like '"% & term & %"'Both of these fail if used Edited August 6, 2015 by ahill Link to comment Share on other sites More sharing options...
ahill Posted August 6, 2015 Author Share Posted August 6, 2015 and it looks like somewhere on my index page the words typed in the box should have to gather in a variable called "word" and then passed the the sql page to pull. Not quite sure how the JS works Link to comment Share on other sites More sharing options...
ahill Posted August 6, 2015 Author Share Posted August 6, 2015 Wait now I was able to make it search. I changedterm = Replace( Trim(Request("word")), "'", "''" )TOterm = Replace( Trim(Request("q")), "'", "''" )Since javascript is passing the variable q from index.html to livesearch.asp.-----------------------------------------------------------------------------------My only problem is now is that I have to figure out how to get each result to display on its own line, right now they are all one line.ex.NOWresult1 result2 result3 result4What I wantresult 1result 2result 3result 4 Link to comment Share on other sites More sharing options...
justsomeguy Posted August 6, 2015 Share Posted August 6, 2015 My only problem is now is that I have to figure out how to get each result to display on its own line, right now they are all one line.You can send parameters to the RecordSet.getString method to tell it how to format the output, or you can loop through the recordset and format things yourself. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now