Variable pouvant contenir des apostrophes
Bonjour tout le monde,
Tout d'abord voila mon code :
Code:
1 2 3 4 5 6
| $req = "SELECT rubrique_personnel.IDRUBRIQUE,LBLFONCTION from rubrique_personnel,fonction_personnel where rubrique_personnel.IDRUBRIQUE=fonction_personnel.IDRUBRIQUE and rubrique_personnel.IDRUBRIQUE=3";
$res=mysql_query($req,$connect);
while($val=mysql_fetch_array($res,MYSQL_ASSOC)){
$qer = "SELECT Count(*) AS Nombre from personnel,fonction_personnel where personnel.IDFONCTION=fonction_personnel.IDFONCTION and LBLFONCTION='".$val['LBLFONCTION']."'";
$res2 =mysql_query($qer,$connect);
$val2=mysql_fetch_array($res2); |
le $val['LBLFONCTION'] ne prend que les châines de caractères qui ne comportent pas d'apostrophes.
Comment faire pour regler ce problème?
Merci de votre précieuse aide.:coucou: