Guest User

Untitled

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