Jump to content

a search in a specified page!


semiColon

Recommended Posts

I think that would have to be JavaScript. My implementation would be to find all text nodes in the DOM and do indexOf() for each of them; then (I imagine) you could highlight the ones you found.Why isn't Ctrl+F good enough?

Link to comment
Share on other sites

I didn't even know that Microsoft added an XML data type to SQL Server. What's the difference between xml and text?
For instance, a stored procedure can include XQuery stuff that addresses elements within the XML field, without retrieving the record.
Link to comment
Share on other sites

Thanks a lot...chris, i have to use a PHP.. it's 4 an exam (:..justsomeguy,thanks, i'm know reading about it (:..Reg Edit,thanks for that (:i have to do it only with: PHP, xhtml, MySQL....Do you see the box search in the bottom of this topic? this is what i mean (:..

Link to comment
Share on other sites

Do you see the box search in the bottom of this topic? this is what i mean (:
If you want a search box on a web page, you will probably place it in an html form, and when that form is submitted, it will submit the form contents. (See the w3schools stuff on html forms).The page that receives the form submission (a PHP page in your case) will be a search results page, but it will contain some server-side script that executes a MySQL database query. You will have to design that query from your knowledge of what data is being searched and what results are to be returned. You say the "current page" is to be searched; therefore your query needs to search the database by reference to the data that was used to display that page. So the form fields you submit will probably need to include some context information about that (which will probably be hidden fields).The PHP page will take the results of the database query and format these results into html for the browser to display the search results page.
Link to comment
Share on other sites

Is it okay if use this stmt:SELECT * FROM articles WHERE body LIKE '%$keyword%'; is it okay to use that syntax?i know that it's slow and inefficient, but i couldn't understand the: Full-text search until now. I have to understand this method these two days..

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...