Affichage requête imbriquée
Bonjour,
je ne comprend pas pourquoi je n'arrive pas à afficher la requête suivante:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| <?php
$req=mysql_query(
"select distinct choix
from test
where nom = 'xxx'
and choix IN (
Select choix
from test
where nom = 'yyy')
and choix IN (
Select choix
from test
where nom = 'zzz')
and choix IN (
Select choix
from test
where nom = 'aaa')
and choix IN (
Select choix
from test
where nom = 'vvv')
and choix IN (
Select choix
from test
where nom = 'sss' ");
while ($voir=mysql_fetch_array($req))
{
echo
$voir["choix"];
}
?> |
J'obtiens un message d'erreur de ce type:
Citation:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/free.fr/e/7/travisweb2/test/resultat.php on line 138
A noter que cette requête fonctionne très bien depuis PhpMyAdmin!
Je ne comprend pas ce qui cloche! Ma version de Mysql est la 5.0.19!
Est-ce que qqn pourrait m'expliquer please :)
Merci