일단 8개의 컬럼에서 검색한다고 하고 검색이 있다는 가정하에..
Dim search(7), kk(7), j, i
search(0) = "uid"
search(1) = "customer"
search(2) = "prodname"
search(3) = "spec"
search(4) = "price"
search(5) = "make"
search(6) = "info"
search(7) = "regdate"
For i = 0 To 7
If request(search(i)) = "" Then '검색이 있는 컬럼만 체크
kk(i) = "no"
Else
kk(i) = "yes"
End If
Next
j = 0
For i = 0 To 7
If kk(i) = "yes" Then
j = j+1
If j = 1 Then
search_sql = " where "&search(i)&" like '%"&request(search(i))&"%'"
Else
search_sql = search_sql & " and "&search(i)&" like '%"&request(search(i))&"%'"
End If
End If
Next
영삼넷
Categories
Recent Posts
Recent Comments
Statistics
- Total Visitors:
- 385841
- Today:
- 68431
- Yesterday:
- 97511516
IT강국 김영삼 블로그에 오신걸 진심으로 환영합니다.
©2002 영삼넷 // openkr
©2002 영삼넷 // openkr