Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/07/2002, 05:54
Avatar de Cain
Cain
 
Fecha de Ingreso: enero-2002
Ubicación: Catalunya
Mensajes: 6.459
Antigüedad: 22 años, 3 meses
Puntos: 17
Re: comparar strings

Código:
$consulta = mysql_query("SELECT COUNT(*) FROM tabla1,tabla2 WHERE tabla1.campo = tabla2.campo");
if ($row = mysql_fetch_row ($consulta)) {$recuento = $row[0];}

if ($recuento > 0) {$inserta = mysql_query("INSERT INTO tabla2 (campo) VALUES (valor)");}
Joe Tawers,
<a href="http://www.ilimit.com/towers">http://www.ilimit.com/towers</a>