Morpheusweb.it - Risorse per webmaster: script, ASP.NET, C#, Visual Basic .Net, tutorial, asp, javascript, css, php, html, java, ADO, VBScript, forms, frames, Active Server Pages, Dynamic HTML, database, gratis per webmaster e webdesigner

Database Search

It makes a query on a string of keywords.
Splits the search string and for each value add a where clause to the query.


<%
SQL = "SELECT * FROM [myTABLE] WHERE ( "
searchArray = Split(Trim(Request("searchPhrase")), " ")
for i = 0 to ubound(searchArray)
  SQL = SQL & " title LIKE '%" & searchArray(i) & "%' OR "
next
SQL = Mid(SQL, 1, Len(SQL)-3) & " )"
%>


Download code...


Print this page


 

Inizio pagina

risorse per webmaster