Ver Mensaje Individual
  #4 (permalink)  
Antiguo 07/06/2003, 19:32
Avatar de nuevo
nuevo
 
Fecha de Ingreso: mayo-2003
Ubicación: Spain
Mensajes: 2.009
Antigüedad: 21 años
Puntos: 2
Exclamación nada me estoy liando y no puedo

he probado con lo que tu dices Custer... pero no llego a mas... y ahora estoy probando esto que encontre... pero me pierdo..


--------------------------------------------------------------------------------<?
$query = "SELECT blob,identifier FROM your_table";
$result = mysql_query($query);
$number = mysql_numrows($result);
$j = 0;
WHILE ($j < $number){

/* Your "blob" */
$body = mysql_result($result,$j,"blob");

/*Your "identifier" */
$qid = mysql_result($result,$j,"qid");

/* Open the noise words into an array */
$noise_words = file("noisewords.txt");
$filtered = $body;

/* Got to put a space before the first word in the body, so that we can
recognize the word later */
$filtered = ereg_replace("^"," ",$filtered);

/* Now we suck out all the noisewords, and transform whats left into an
array */
/* Brought to you by poor ereg coding! */
for ($i=0; $i<count($noise_words); $i++) {
$filterword = trim($noise_words[$i]);
$filtered = eregi_replace(" $filterword "," ",$filtered);
}
$filtered = trim($filtered);
$filtered = addslashes($filtered);
$querywords = ereg_replace(",","",$filtered);
$querywords = ereg_replace(" ",",",$querywords);
$querywords = ereg_replace("?","",$querywords);
$querywords = ereg_replace("(","",$querywords);
$querywords = ereg_replace(")","",$querywords);
$querywords = ereg_replace(".","",$querywords);
$querywords = ereg_replace(",","','",$querywords);
$querywords = ereg_replace("^","'",$querywords);
$querywords = ereg_replace("$","'",$querywords);
/* We should now have something that looks like 'Word1','Word2','Word3'
so lets turn it into an array */
$eachword = explode(",", $querywords);

/* and finally lets go through the array, and place each word into the
database, along with its identifier */
for ($k=0; $k<count($eachword); $k++){
$inputword = "INSERT INTO search_table VALUES($eachword[$k],$qid)";
mysql_query($inputword);
}
/* Get the next set of data */
$j++;
}
?>



solo necesito un formulario con un campo de texto para poner unas palabras y buscar en un registro, nada mas

alguien se aclara...