Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/05/2009, 19:36
Avatar de death_nemesis
death_nemesis
 
Fecha de Ingreso: abril-2009
Ubicación: Santiago - Chile
Mensajes: 147
Antigüedad: 15 años
Puntos: 2
Gracias por responder tan rapido tattojk, y vale por tu ayuda hice lo que me dijiste y funciono altiro, voy a hacerlo de la misma manera en los demas querys para que asi no tenga problemas a futuro.

PD: Si me hacia el update de la menera que aparece aqui solo que me salia ese error, que ya no esta mas

ahora resulta que tengo otro problema resulta que el primer update lo hace sin problemas pero el segundo no. será por que no estoy haciendo bien quizas el update anidado ?
dejo las tablas para que asi se aprecie mejor el update que quiero hacer y claro el codigo

Cita:
create table REGISTRO(
reg_id int not null identity(1,1)constraint pkreg primary key,
reg_usu varchar(50) not null,
reg_pas varchar(50),
pai_id int not null constraint fkreg1 foreign key references PAIS(pai_id),
gen_id int not null constraint fkreg2 foreign key references GENERO(gen_id),
est_id int not null constraint fkreg3 foreign key references ESTADO (est_id),
reg_num int not null
);

create table CLIENTE(
cli_id int not null identity(1,1) constraint pkcli primary key,
reg_id int not null constraint fkcli1 foreign key references REGISTRO(reg_id),
cli_nom varchar (100) not null,
cli_ape varchar (100)not null,
est_id int not null constraint fkcli3 foreign key references ESTADO(est_id),/*situacion del cliente*/
cli_eda int not null,
cli_zipcode int not null,
prehos_id int constraint fkcli4 foreign key references preferencia_hospedaje(prehos_id),
motvia_id int constraint fkcli5 foreign key references motivo_viaje(motvia_id),
frehos_id int constraint fkcli6 foreign key references Frecuencia_hospedaje(frehos_id),
cli_nin int,/*cantidad de niños con los que viaja generalmente*/
cli_fec varchar(50),
cli_num int not null,
);
Código PHP:
$update mssql_query("UPDATE REGISTRO SET REGISTRO.reg_usu ='$mail',REGISTRO.pai_id ='$pais' WHERE REGISTRO.reg_usu ='$id_user'",$con);
$update mssql_query("UPDATE CLIENTE  SET CLIENTE.cli_nom ='$nom',CLIENTE.cli_ape='$ape',CLIENTE.cli_zipcode ='$codigo' where CLIENTE.reg_id ='$id_user'",$con); 
PD: en el sql si me resulta el update pero en php no

Última edición por GatorV; 12/05/2009 a las 20:06