Ver Mensaje Individual
  #4 (permalink)  
Antiguo 05/11/2009, 21:07
Avatar de zaetoner
zaetoner
 
Fecha de Ingreso: noviembre-2007
Ubicación: La ciudad de México
Mensajes: 607
Antigüedad: 16 años, 5 meses
Puntos: 30
Respuesta: Consulta a Varios campos.

$link=mysql_connect("localhost","root","");
mysql_select_db("agenda",$link);
#Busca en un campo, la palabra y lo ordena por un campo especifico.
$sql = "SELECT * FROM nombres WHERE $campoac LIKE '%{$_POST['nombre']}%'";
$result=mysql_query($sql, $link);

while($row=mysql_fetch_array($result)){

echo "<table width=\"431\">
<tr><td width=\"425\"><table width=\"100%\"><tr><strong>
<td width=\"205\"><div align=\"center\"><font color=\"#0099FF\">Nombre:</font></strong>".$row['nombre']."</td>
<td width=\"206\"><strong><font color=\"#0099FF\">Apellido:</font></strong>".$row['apellido']."</td>
</tr></table></td></tr><tr>
<td><strong><font color=\"#0099FF\">Teléfono:</font></strong>".$row['telefono']."</div></td></tr>
</table>";
echo "<p></p> \n";
echo "<hr>";


}
__________________
...