Ma requête est de lancer une erreur commerequête select MySQL Erreur
select id,cHospital from med_patient where cHospital is not null union
select id,cHospital1 from med_patient where cHospital1 is not null union
select id,cHospital2 from med_patient where cHospital2 is not null order by 1
L'erreur est
Notice: Undefined index: cHospital1 dans F: \ wamp \ www \ MMR-finale \ admin \ all_hospital_list.php sur la ligne 97
Notice: Undefined index: cHospital2 dans F: \ wamp \ www \ MMR-finale \ admin \ all_hospital_list.php sur la ligne 98
Non ice: Indéfini index: cHospital1 dans F: \ wamp \ www \ mmr-final \ admin \ all_hospital_list.php à la ligne 97
Indication: Indéfini index: cHospital2 dans F: \ wamp \ www \ mmr-final \ admin \ all_hospital_list.php sur la ligne 98
Indication: indice défini: cHospital1 dans F: \ wamp \ www \ mmr-finale \ admin \ all_hospital_list.php sur la ligne 97
Indication: indice défini: cHospital2 dans F: \ wamp \ www \ mmr-final \ admin \ all_hospital_list.php à la ligne 98
Indication: Index indéfini: cHospital1 dans F: \ wamp \ www \ mmr-final \ admin \ all_hospital_list.php à la ligne 97
Notice: Undefined index: cHospital2 dans F: \ wamp \ www \ MMR-finale \ admin \ all_hospital_list.php en ligne 98
Notice: Undefined index: cHospital1 dans F: \ wamp \ www \ mmr- finale \ admin \ all_hospital_list.php sur la ligne 97
Indication: indice défini: cHospital2 dans F: \ wamp \ www \ mmr-finale \ admin \ all_hospital_list.php sur la ligne 98
Indication: indice défini: cHospital1 dans F: \ wamp \ www \ mmr-final \ admin \ all_hospital_list.php à la ligne 97
e: Undefined index: cHospital2 dans F: \ wamp \ www \ MMR-finale \ admin \ all_hospital_list.php en ligne 98`
Et il est nul lancer la ligne.
Comment cette requête peut-elle être modifiée pour ne pas provoquer d'erreur?
Le problème n'est pas la requête, mais le PHP. Pouvez-vous poster le fichier complet ou au moins plus du code environnant? – Tom
http://pastebin.com/m4fbf313d – Bharanikumar
je dis ce que j'essaie exactement .. voir j'ai trois champs, chospital, chospital1, chospital2, dans la table tbl1, j'ai environ 50 entrées de patients, certains patients peuvent avoir chostial1, chosptail2, certains patients ont un code chopsital, je veux rendre tout le code de la table tbl2, je ne veux pas de duplication dans mon outout, aussi pas de valeurs nulles .. – Bharanikumar