Ver Mensaje Individual
  #11 (permalink)  
Antiguo 03/01/2005, 10:26
pakillo
 
Fecha de Ingreso: mayo-2004
Mensajes: 400
Antigüedad: 19 años, 11 meses
Puntos: 0
Hola, yo no se mucho de php y me gustaria saber como puedo hacer antes la consulta del registro, para que no los duplique, el insert que utilizo es este

Código PHP:
 mysql_query("INSERT INTO ".C_MYSQL_MEMBERS." VALUES ('','".$fname."','".$lname."','".$pass."',
      '"
.$year."-".$month."-".$day."','".$gender."',
      '"
.$purpose."','".$country."','".$email."','".$url."',
      '"
.$icq."','".$aim."','".$phone."','".$city."','".$marstat."','".$child."','".$height."','".$weight."','".$hcolor."','".$ecolor."','".$etnicity."','".$religion."','".$smoke."','".$drink."','".$education."','".$job."','".$hobby."','".$descr."','".$pideal."','".$sgender."','".$setnicity."','".$sreligion."','".$agef."','".$aget."','".$heightf."','".$heightt."','".$weightf."','".$weightt."','".$hdyfu."','".$picture[0]."','".$picture[1]."','".$picture[2]."','".horo($month$day)."',NOW(''),NOW(''),INET_ATON('".ip()."'),'".$cst."','0')") or die(mysql_error());

    
$last_id mysql_fetch_array(mysql_query("SELECT LAST_INSERT_ID() AS last_id"));
    
$last_id $last_id['last_id']; 
como tengo que hacer la busqueda del registro antes?
un saludo