Foros del Web » Programación para mayores de 30 ;) » Bases de Datos General »

Porfvor ayuda

Estas en el tema de Porfvor ayuda en el foro de Bases de Datos General en Foros del Web. Alguien sabe decirme que debo modificar aqui para que la bsuqueda solo se base en tres criterios y musetre los resultados solamente de estos tres ...
  #1 (permalink)  
Antiguo 07/06/2003, 13:02
 
Fecha de Ingreso: junio-2002
Mensajes: 70
Antigüedad: 21 años, 10 meses
Puntos: 0
Porfvor ayuda

Alguien sabe decirme que debo modificar aqui para que la bsuqueda solo se base en tres criterios y musetre los resultados solamente de estos tres criterios??? q elimino ?? (no se nada casi de mysql).

Tengo un script busueda2.php y necesito saber eso como hago para q la busqueda se base solo en 3 de los criterios q tengo ahora mismo q sn 9 .

Gracias de antemano

<?

include("incs/funcs.inc.php");

connect();



$query="select * from sexo";

$rsexos=mysql_query($query);



$query="select * from lenguajes";

$rlenguajes=mysql_query($query);



$query="select * from paises";

$rpaises=mysql_query($query);



$query="select * from educacion";

$reducacion=mysql_query($query);



$query="select * from ocupacion";

$rocupacion=mysql_query($query);



$query="select * from relacion_buscada";

$rrelacion_buscada=mysql_query($query);



$query="select * from zodiaco";

$rzodiaco=mysql_query($query);



$query="select * from tipo_de_encuentro";

$rtipo_de_encuentro=mysql_query($query);



$query="select * from comoconn";

$rcomoconn=mysql_query($query);



?>

<html>

<head>

<script language="JavaScript">

<!--

function MM_findObj(n, d) { //v4.0

var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

if(!x && document.getElementById) x=document.getElementById(n); return x;

}



function MM_validateForm() { //v4.0

var i,p,q,nm,test,num,min,max,errors='',args=MM_valida teForm.arguments;

for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);

if (val) { nm=val.name; if ((val=val.value)!="") {

if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');

if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';

} else if (test!='R') {

if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';

if (test.indexOf('inRange') != -1) { p=test.indexOf(':');

min=test.substring(8,p); max=test.substring(p+1);

if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';

} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }

} if (errors) alert('The following error(s) occurred:\n'+errors);

document.MM_returnValue = (errors == '');

}

//-->





function KeyCheck(myfield,e)

{

var keycode;

if (window.event) keycode = window.event.keyCode;

else if (e) keycode = e.which;

else return true;

if (((keycode>47) && (keycode<58) ) || (keycode==8)) { return true; }

else return false;

}



</script>



</head>



<body>

<table width="90%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="12">

<div align="center"></div>

</td>

<td>

<div align="left"><img src="/img/search.gif" width="142" height="39"></div>

</td>

<td>&nbsp;</td>

</tr>

<tr>

<td colspan="3">

<table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="12"><img src="/img/arr_izq.gif" width="12" height="12"></td>

<td background="/img/arr.gif"><img src="/img/arr.gif" width="3" height="12"></td>

<td width="12"><img src="/img/arr_der.gif" width="12" height="12"></td>

</tr>

<tr>

<td width="12" background="/img/izq.gif"><img src="/img/izq.gif" width="12" height="3"></td>

<td>

<script language="javascript">

var isIE = document.all?true:false;

var isNS = document.layers?true:false;

function onlyDigits(e) {

var _ret = true;

if (isIE) {

if (window.event.keyCode < 46 || window.event.keyCode > 57) {

window.event.keyCode = 0;

_ret = false;

}

}

if (isNS) {

if (e.which < 46 || e.which > 57) {

e.which = 0;

_ret = false;

}

}

return (_ret);



}

</script>

<form action="./do_search.php" name="frmSearch" method="post">

<table width="46%" border="0" align="center" class="TextNormal">

<tr>

<td width="33%">Geschlecht</td>

<td width="67%">

<select name="sexo" class="Box">

<?

while ($row=mysql_fetch_array($rsexos))

{

echo "<option value=".$row["id_sexo"].">";

echo $row["descripcion"];

echo "</option>";

}

?>

</select>

</td>

</tr>

<tr>

<td>Sprache</td>

<td>

<select name="lenguaje" class="Box">

<?

while ($row=mysql_fetch_array($rlenguajes))

{

echo "<option value=".$row["id_lenguaje"].">";

echo $row["descripcion"];

echo "</option>";



}

?>

</select>

</td>

</tr>

<tr>

<td>Alter</td>

<td>

<input name="edad1" type="text" class="box" value="15" size="1" maxlength=2 onKeyPress="return KeyCheck(this,event);">

to

<input name="edad2" type="text" class="box" value="60" size="1" maxlength=2 onKeyPress="return KeyCheck(this,event);">

</td>

</tr>

<tr>

<td>Statur (m) (ej: 1.54)</td>

<td>

<input name="estatura1" type="text" class="box" value="1" size="1" maxlength=4 onKeyPress="return KeyCheck(this,event);">

to

<input name="estatura2" type="text" class="box" value="2" size="1" maxlength=4 onKeyPress="return KeyCheck(this,event);">

<script>

if (isNS) document.captureEvents(Event.KEYPRESS);

document.onkeypress=onlyDigits;

</script>



</td>

</tr>

<tr>

<td>rauchen Sie?</td>

<td>

<select name="fuma" class="Box">

<option value="1">Ja</option>

<option value="0">Nein</option>

</select>

</td>

</tr>

<tr>

<td>Land</td>

<td>

<select name="pais" class="Box">

<?

while ($row=mysql_fetch_array($rpaises))

{

echo "<option value=".$row["id_pais"].">";

echo $row["descripcion"];

echo "</option>";

}

?>

</select>

</td>

</tr>

<tr>

<td>Studium</td>

<td>

<select name="educacion" class="Box">

<?

while ($row=mysql_fetch_array($reducacion))

{



echo "<option value=".$row["id_educacion"].">";

echo $row["descripcion"];

echo "</option>";



}

?>

</select>

</td>

</tr>

<tr>

<td>Selbstständig</td>

<td>

<select name="ocupacion" class="Box">

<?

while ($row=mysql_fetch_array($rocupacion))

{



echo "<option value=".$row["id_ocupacion"].">";

echo $row["descripcion"];

echo "</option>";



}

?>

</select>

</td>

</tr>

<tr>

<td>Beziehung</td>

<td>

<select name="relacion_buscada" class="Box">

<?

while ($row=mysql_fetch_array($rrelacion_buscada))

{

echo "<option value=".$row["id_relacion_buscada"].">";

echo $row["descripcion"];

echo "</option>";



}

?>

</select>

</td>

</tr>

<tr>

<td>Sternzeichen</td>

<td>

<select name="zodiaco" class="Box">

<?

while ($row=mysql_fetch_array($rzodiaco))

{



echo "<option value=".$row["id_zodiaco"].">";

echo $row["descripcion"];

echo "</option>";



}

?>

</select>

</td>

</tr>



<tr>

<td>Kontaktwunsch</td>

<td>

<select name="tipo_de_encuentro" class="Box">

<?

while ($row=mysql_fetch_array($rtipo_de_encuentro))

{



echo "<option value=".$row["id_tipo_de_encuentro"].">";

echo $row["descripcion"];

echo "</option>";



}

?>

</select>

</td>

</tr>



<tr>

<td>commonconn</td>

<td>

<select name="comoconn" class="Box">

<?

while ($row=mysql_fetch_array($rcomoconn))

{



echo "<option value=".$row["id_comoconn"].">";

echo $row["descripcion"];

echo "</option>";



}

?>

</select>

</td>

</tr>



<tr>

<td>Anzeige mit Bild </td>

<td><input name="chkfoto" type="checkbox" value="1" class="Box" checked></td>

</tr>

<tr>

<td>Wie viele Anzeigen per page</td>

<td><select name="resultados" class="Box">

<option value="5">5</option>

<option value="10">10</option>

<option value="15">15</option>

<option value="20">20</option>

<option value="25">25</option>

<option value="30">30</option>

</select>

<input name="offset" type="hidden" value="0">

</td>

</tr>

<tr>

<td></td>

<td>

<input name="envia" type="submit" class="Box" value="Suchen" onClick="MM_validateForm('edad1','','R','edad2','' ,'R','estatura1','','R','estatura2','','R');return document.MM_returnValue">

</td>

</tr>

</table>

</form>

</td>

<td width="12" background="/img/der.gif"><img src="/img/der.gif" width="12" height="8"></td>

</tr>

<tr>

<td width="12"><img src="/img/aba_izq.gif" width="12" height="12"></td>

<td background="/img/aba.gif"><img src="/img/aba.gif" width="2" height="12"></td>

<td width="12"><img src="/img/aba_der.gif" width="12" height="12"></td>

</tr>

</table>

</td>

</tr>

</table>

</body>

</html>
__________________
Rob
Queridas Islas cies te estan llenando de fuel , ¡¡¡putos políticos de mierda que me las vais a joder(os quería ver nandando en fuel a todos CABRONES¡¡¡

Última edición por Rober1978; 07/06/2003 a las 13:02
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:17.