<%
	sex=Request("sex")
	byear=Request("byear")
	bmonth=Request("bmonth")
	bday=Request("bday")
	martial=Request("martial")
	relation=Request("relation")
	'///////////////
	work_province=Request("work_province")
   work_city=Request("work_city")
	place=Request("place")
	city=Request("city")
	job=Request("job")
	jobtitle=Request("jobtitle")
	'constellation=Request("constellation")
	'blood=Request("blood")
	income=Request("income")
	edu=Request("edu")
	'///////////////////////
sql="select * from user where user_name like '%'"
if sex<>"0" then
	sql=sql&" and sex='"&sex&"'"
end if
if byear<>"0" then
	sql=sql&" and byear='"&byear&"'"
end if
if bmonth<>"0" then
	sql=sql&" and bmonth='"&bmonth&"'"
end if
if bday<>"0" then
	sql=sql&" and bday='"&bday&"'"
end if
if martial<>"0" then
	sql=sql&" and married='"&martial&"'"
end if

if relation<>"0" then
	sql=sql&" and relation='"&relation&"'"
end if
'//////////////////////////
if work_province<>"0" then
	sql=sql&" and work_province='"&work_province&"'"
end if
if work_city<>"" then
	sql=sql&" and work_city='"&work_city&"'"
end if
'//////////////////////////
if place<>"0" then
	sql=sql&" and province='"&place&"'"
end if
if city<>"" then
	sql=sql&" and city='"&city&"'"
end if
if job<>"0" then
	sql=sql&" and vocation='"&job&"'"
end if
if jobtitle<>"0" then
	sql=sql&" and employment='"&jobtitle&"'"
end if
'if constellation<>"0" then
'	sql=sql&" and constellation='"&constellation&"'"
'end if
'if blood<>"0" then
'	sql=sql&" and blood='"&blood&"'"
'end if
if income<>"0" then
	sql=sql&" and salary='"&income&"'"
end if
if edu<>"0" then
	sql=sql&" and education='"&edu&"'"
end if
sql=sql&" ORDER BY user.weight DESC , user.photo DESC"
session("sql")=sql
'Response.Write sql 
'Response.End 
Response.Redirect "show_search.asp?move=1"

%>
