Estos tus valores enviados
edad
categoria1
sexo
poblacion
provincia
pretencion_economica
tipo_jornada
si viene con valor es que hay que meterlos en la cadena
Código PHP:
sql = "select * from curriculums where "
SLQAnexo = ""
if edad <> "" then
SLQAnexo = SLQAnexo & "edad = " & edad & " and "
end if
if categoria1 <> "" then
SLQAnexo = SLQAnexo l & "categoria1 = " & categoria1 & " and "
end if
if sexo <> "" then
SLQAnexo = SLQAnexo & "sexo = " & sexo & " and "
end if
...
luego cortas el ultimo and
SLQAnexo = mid(SLQAnexo,1,len(SLQAnexo) - 4)
SQL = SQL & SLQAnexo
digo no se si así te jale mejor
[ando desvariando[
suerte