Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sql = "INSERT INTO usuario (";
- $sql .= "CUM, Nombre, A_Pat, A_Mat, Sexo, F_Naci, Vigencia, Provincia, Grupo_S, Seccion, Scouter_Responsable,";
- $sql .= "Tel_Cel, Password, Estatura, Peso, Color_Cabello, Color_Ojos, Color_Piel, Tipo_Sangre, Donar_Sangre, Dieta, Alcohol,";
- $sql .= "Fumador, Uso_Sustancias,Fam_Diabetes, Fam_Hipertension, Afecciones_Frio_Calor, Fk_Info_Emergencia, Fk_Regnal, Tipo_Usuario";
- $sql .= ") VALUES (";
- $sql .= ":cum,'".$this->Nombre."', :ap_pa, :ap_ma, :sexo,'".$this->F_Nac."','".$this->Vigencia."',:provincia,:grupo,:seccion,:scouterR,:celular,:passuser,:estatura,";
- $sql .= ":peso,'".$this->Color_Cabello."',:color_ojos,:color_piel,'".$this->Tipo_Sangre."',:donarsangre,:dieta,'".$this->Alcohol."',:fuma,:sustanciasrecreativas,'".$this->Fam_Diabetes."',";
- $sql .= ":familiahipertension,:afecciones,'1','jalo000001',:tipouser)";
- $consulta = $conexion->prepare($sql);
- $consulta->bindParam(':cum', $this->CUM);//1
- $consulta->bindParam(':nombre', $this->Nombre);//2
- $consulta->bindParam(':ap_pa', $this->A_Pat);//3
- $consulta->bindParam(':ap_ma', $this->A_Mat);//4
- $consulta->bindParam(':sexo', $this->Sexo);//5
- $consulta->bindParam(':fechadenacimiento', $this->F_Nac);//6
- $consulta->bindParam(':vigenciascout', $this->Vigencia);//7
- $consulta->bindParam(':provincia', $this->Provincia);//8
- $consulta->bindParam(':grupo', $this->Grupo_S);//9
- $consulta->bindParam(':seccion', $this->Seccion);//10
- $consulta->bindParam(':scouterR', $this->Scouter_Responsable);//11
- $consulta->bindParam(':celular', $this->Tel_Cel);//12
- $consulta->bindParam(':passuser', $this->Password);//13
- $consulta->bindParam(':estatura', $this->Estatura);//14
- $consulta->bindParam(':peso', $this->Peso);//15
- $consulta->bindParam(':color_cabello', $this->Color_Cabello);//16
- $consulta->bindParam(':color_ojos', $this->Color_Ojos);//17
- $consulta->bindParam(':color_piel', $this->Color_Piel);//18
- $consulta->bindParam(':tiposangre', $this->Tipo_Sangre);//19
- $consulta->bindParam(':donarsangre', $this->Donar_Sangre);//20
- $consulta->bindParam(':dieta', $this->Dieta);//21
- $consulta->bindParam(':bebealcohol', $this->Alcohol);//22
- $consulta->bindParam(':fuma', $this->Fumador);//23
- $consulta->bindParam(':sustanciasrecreativas', $this->Uso_Sustancias);//24
- $consulta->bindParam(':familiadiabetes', $this->Fam_Diabetes);//25
- $consulta->bindParam(':familiahipertension', $this->Fam_Hipertension);//26
- $consulta->bindParam(':afecciones', $this->Afecciones_Frio_Calor);//27
- //$consulta->bindParam(':infoemerg', '1');
- //$consulta->bindParam(':regnalito', 'JAL0290507');
- $consulta->bindParam(':tipouser', $this->Tipo_Usuario);//28
- // var_dump($consulta);
- if (!$consulta || !$consultaEmergencia)
- {
- $this->mensaje = $mensaje = $conexion->errorInfo();
- }else {
- //$consultaEmergencia->execute();
- $consulta->execute();
- $this->mensaje = "Se hizo el insert";
- }
Add Comment
Please, Sign In to add comment