I am trying to make a search page. Once a serach word or words is put in I need it to serach multiple product tables and output the description of any prioduct if the search word is present in the description.
However, If i put in 2 keywords like "paper sticker" I get no results. How do you search multiple keywords? Code:
How to perform multiple search using asp in website, the search from local adn remote database. the local search is working properly, but the remote search stil kinda stuck with it... my local search script(work well):
dim Connection set Connection = server.createobject("ADODB.Connection") Connection.open "Provider=SQLOLEDB;DATA SOURCE=PROTOS;UID=smc;PWD=project;DATABASE=Virtual-Observatory"
how to attach the remote database search for the same website??
</SELECT> so my search string will be select * from table where rs("itemID") = '"&items&"'
and my quiz is if i want 2 make the drop-down box (items) = all i mean i want the sql statment sellects all of the names what should b the value of the all option ?
note im using 3 or 4 drop-down box and i may nedd the value of some of them to b all and the othere takes any value.
I want to do is search through a database based on what was selected on a form.It will be based on state, county, and category.Out of the search I just want one field out of the database, the email field. Now, at first I had one table to mess with so I was using this:
strSQL = "SELECT DISTINCT EMail FROM Info WHERE Category='" & category &"' AND State='" & state &"' AND County='" & county &"'"
the way the database is going to be set up now what I need to do is search through one table that will have all the states, counties, category, and UserID fields.Then it has the other table that will have a UserID field and an email field.So I guess it needs to go through the first table and depending on what state, cat, county were selected it will take that UserID and match it to the UserID in the email table and then pull the emails that match UserID.UserID? Would this use JOIN? UNION? How would this be done, to take the form info and search the one table and then depending on what userid matches the state, county, and category in that table it matches that userid to the userid in the email table and pulls the emails from the email field.
i have a simple search page which i want to search mutiple tables with different layouts so i can return the search results in one recordset. how owuld i do this?
how to search multiple fields in an access database?Basically I want the code to search an entire table, field irrelevant.While I'm at it, does anyone know how to make the same search not care about word order or placement?
Such as: Search string: "John went to the store"
returns the same results as
Search string: "The store went to John"
Just thought I would throw these out there and see what direction anyone can lead me.
I have a form on one page where someone selects a bunch of options and details about a specific category. Then on the next page they fill out a form with contact information, name, address, email, etc.
Well what I want to know is when they click Submit on that contact form is there a way to have it so it goes through and searches the database for any that match the state and county(which they will select from a )??
So what I basically want right now is for the first form to be filled out, then the second form to be filled out, then when they are submitted it will go through the database and select everyone in there with that state and county, then on the next page display the results of both forms AND the matches in the db(obviously whatever fields I want it to display).
I already have both forms(basic html), I already have the dynamic dropdown for state and county(classic asp), what Im wondering is how do I put that dynamic dropdown in the contact form and then when submitted it will go through and search the db based on what was selected there. Would this be some sort of onClick for the submit button tellin it to search the db based on the dropdown or how would I get started on something like this?
There will be other information on the dropdown like name address email so one problem I was wondering about was my dropdown menu. When you select the state it refreshes the page and then loads the counties, so wouldnt that erase anything that was filled out on the form?
I could make it so they actually type the name of their state and county but that causes problems too because if they mispell either then it wont return any results.
I am trying to search for clients contained within a database using multiple search criteria that the user is able to select using a front end form.
The user is able to select there criteria by selecting one or more check boxes and the results are thus retrieved based on what the user has selected. The search works fine until you try and select multiple client types Code:
I've created a little search engine that works fine, but I want to highlight the keywords in an article. Using the replace function is OK, but its not very good when covering different cases. Its fine on single word searches but no good with multiple words. eg. if I search for "dog", I can do a replacement on "dog", "DOG" and "Dog" using the replace function. If I was to search for "black dog", I need to cover all possible variants. ("Black Dog", "BLACK DOG", "black dog", "Black dog", "black Dog") Is there any way of getting this to work?
Im trying to create a function to where when I call the function, it returns the next keyword from the list, and the list is only a string of keywords split by comma's. I know how to split it, but I dont know how to have the function call out the next keyword. keyword1,keyword2,keyword3,keyword4.Code:
<%=Function1(keyword)%> 'Will spit out Keyword 1
<%=Function1(keyword)%> 'Will spit out Keyword 2
<%=Function1(keyword)%> 'Will spit out Keyword 3
<%=Function1(keyword)%> 'Will spit out Keyword 4
Then I need it to start over again once it gets to the last function. This function will be spread out across the page.
my problem is searching. i want to search words within webpage which is stored in one directory.it is different from normal directory searching beacause i am searching inside the webpage.
so i want to omit all that html tags or other asp codes. also i want to know that is there any way to store webpage inside the database. it will be efficient than storing inside the directory.
Does anyone have a definitive list of keywords to avoid or prohibit as field names for the tables for an ASP driven program that communicates with a SQL database?
I have a website that allows customers to define tables online and I keep hitting the field names I need to prohibit - "Function" is the latest one. I'd like to just compare the users field names with a list and end this problem for good! Also any VBScript words too?
I know that trim removes white space and the LTrim and R trim removes space from the left or right but how would i trim a string after 20 characters so that i could add ... to the end of the new trimmed string???
i don't know what to do here exactly. i have seen the TRIM function, but i'm not sure if it's the right way to do it. i have a recordset called RSUSEREDIT. in the recordset there is a column called "EMail". i can print out the results using Code:
<%=RSUSEREDIT("Email")%>
the email column always uses the same domain name... - username@domain.com is it possible to remove the part after and including the "@"?
Both commas are added dynamically and can be trimmed on the fly. I tried using RTRIM(strSQL, ",") but this didn't work.I put the fields into an array and tried to add only commas to all but the last entry, but that also didn't work.
I have a database field that is a memo type. I would like to be able to only display the first 50 words from the database. I would like for it to show ..... after about 50 words.
I am using <%=Content %>. How do I trim this field to show only 50 words and then ....?
I tried the following code: Function LengthTrim(input, length) If Len(input) > length Then Return Left(input, length) + "..." Else Return input End If End Function
then <%= LengthTrim(Content, 50) %>
But it would not work. I got the following error message:
Microsoft VBScript runtime error '800a01f4'Variable is undefined: 'Return' .
I am storing URL in a database for a 'sort of' directory type website.The <a href> is built from the recordset of URL's which is all working no problem, easy stuff.What I have found is going to be necessary in some cases is to trim the URL back to just it's www.abc.co.uk address for the link display.
I still want the actual link to go to it's long 'deep linking' location, but there is limited room for displaying a URL that could be a hundred chars long.
I have a section on my website that lets users to input their own username and password in order to enter the restricted area, but i notice that some of the users likes to use strange characters to use as their username or password.
how could I trim those strange characters ie. like the follow !@#$%^&*()'{}/?~ out of the input field, WITHOUT using the javascript because javascript can be disabled from the browser and by only using the ASP IF ELSEIF statements to do so?
I have an Access db of products which I'd like to use for creating dynamic urls. Each product has a range name which I intend to use to point to the folder containing the relevant image eg pine/001.jpg
My problem is one of the ranges has two names ie Indian Accessories. I can't have a url with a space in it so how can I dynamically alter the field so that it displays the url as either indianaccessories or indian-accessories?
Someone should write a book Javascript for VBScript Programmers. I can't seem to find a native function in Javascript to trim a string. Is there one or does anyone have one handy?
i have a search page results what i want to do is trim the result to 100 chars either side of the matched word but say if the word is at the start or end just to trim 100 chars left or right. does anyone have a function that will do this ?