Ver Mensaje Individual
  #10 (permalink)  
Antiguo 08/04/2005, 03:17
sintesk7
 
Fecha de Ingreso: agosto-2004
Mensajes: 349
Antigüedad: 19 años, 7 meses
Puntos: 3
No me funciona

Agadezco vuestra ayuda, pero no logro que funcione.

Adjunto el código entero por si alguien lo ve:

Código PHP:
<?php require_once('Connections/mallorcaempresa.php'); ?>
<?php
$colname2_Recordset1 
"1";
if (isset(
$_GET['select'])) {
  
$colname2_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['select'] : addslashes($_GET['select']);
}
$colname_Recordset1 "1";
if (isset(
$_GET['busca'])) {
  
$colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['busca'] : addslashes($_GET['busca']);
}

$query=mysql_select_db($database_mallorcaempresa$mallorcaempresa);

$palabrasexplode (" "$_GET['busca']); 

if(
count($palabras)>1) { 
$query_Recordset1 sprintf
("SELECT * , MATCH (nomempresa,frase) AGAINST ('%%%s%%') AS puntuacion 
FROM empreses WHERE MATCH (nomempresa,frase) AGAINST ('%%%s%%') ORDER BY puntuacion 
DESC LIMIT 50"

$colname_Recordset1,$colname_Recordset1);
$Recordset1 mysql_query($query_Recordset1$mallorcaempresa) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);


} if(
count($palabras)<2) { 
$query_Recordset1 sprintf
("SELECT * FROM empreses WHERE (nomempresa like '%%%s%%' or frase like '%%%s%%' )
and idpoble like '%s'"

$colname_Recordset1,$colname_Recordset1,$colname2_Recordset1);
$Recordset1 mysql_query($query_Recordset1$mallorcaempresa) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);

 
echo 
$query

?>

Código HTML:
<html>
<head>
<title>mallorca</title>

<link href="estilos/estilos.css" rel="stylesheet" type="text/css">
<style type="text/css">

</head>

<body bgcolor="#325579" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="color: #666666">
<br>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td valign="bottom" class="blanco"> <p align="center">
    <img border="0" src="images/cabecera.jpg" width="695" height="50"></p>
    </td>
  </tr>
</table>
<br>
<div align="center">
  <center>
<table width="700" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
  <tr> 
    <td align="left"> 
      <table width="700" border="0" align="center" cellpadding="0" cellspacing="20" bgcolor="#FFFFFF" height="1">
        <tr> 
          <td valign="top" class="tabla-datos" height="1">
            <table width="660" border="0" cellspacing="0" cellpadding="0" height="79"  style="border-collapse: collapse" bordercolor="#111111">
              <tr valign="top"> 
                <td width="400" align="center" height="79"> 
                  <table width="500" border="0" cellspacing="0" cellpadding="0" height="73" style="border-collapse: collapse" bordercolor="#111111">
      <tr> 
        <td height="20" colspan="3" bgcolor="#FEE05E"><span class="blanco  Estilo7"><span class="blanco  Estilo13"><span class="blanco  Estilo11"><img src="images/pixel.gif" width="10" height="10"><span class="Estilo21"><?php echo $row_Recordset1['nomempresa']; ?></span></span></span></span></td>
        </tr>
      <tr> 
        <td height="1" colspan="3" background="images/pnts_h.gif">
        <img src="images/pixel.gif" width="1" height="1"></td>
      </tr>
      <tr> 
        <td height="20"><p>&nbsp;</p></td>
        <td height="20" colspan="2" class="Estilo22"><?php echo $row_Recordset1['frase']; ?></td>
      </tr>
      <tr> 
        <td height="1" colspan="3" background="images/pnts_h.gif">
        <img src="images/pixel.gif" width="1" height="1"></td>
      </tr>
      <tr> 
        <td width="6" height="20"><p align="left">&nbsp; </p></td>
        <td width="400"><?php echo $row_Recordset1['direccio']; ?></td>
        <td width="127">Tel: <?php echo $row_Recordset1['telefon']; ?></td>
      </tr>
      <tr> 
        <td height="1" colspan="3" background="images/pnts_h.gif">
        <img src="images/pixel.gif" width="1" height="1"></td>
      </tr>
      <tr> 
        <td height="18"><p>&nbsp; </p></td>
        <td height="18" colspan="2"><?php echo $row_Recordset1['email']; ?><?php echo $row_Recordset1['link']; ?></td>
      </tr>
      </table>
                      
                </td>
                <td width="1" align="center" background="images/pnts_v.gif" height="79">
                <img src="images/pixel.gif" width="1" height="1"></td>
                <td width="493" height="79" align="center" valign="middle" bgcolor="#DDF1F1"><div align="center"><img src="fotos/<?php echo $row_Recordset1['foto']; ?>"> 
                </div></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
    <td bgcolor="#434633"><img src="images/pixel.gif" width="2" height="1"></td>
  </tr>
</table>
  </center>
</div>
<table width="702" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="left" bgcolor="#434633">
    <img src="images/pixel.gif" width="1" height="2"></td>
  </tr>
</table>
<br>
<div align="center"><br>
</div>
<p>&nbsp;</p></body>
</html> 



Código PHP:
<?php
mysql_free_result
($Recordset1);
?>