[SQL]Fatal error in the query

Solved
hharchi9 Posted messages 693 Status Membre -  
hharchi9 Posted messages 693 Status Membre -
Hello,
I must have an error (more or less significant) in my query, but as strange as it may seem, I can't find it...

I hope you can see it better than I can

Here is my problematic query:

 $reponse= $bdd->query( 'SELECT Titre,affiche,lien,Genre FROM FROM films WHERE coupdecoeur=1 UNION SELECT Titre,affiche,lien,Genre FROM sagas WHERE coupdecoeur=1 ORDER BY Titre'); while ($donnees = $reponse->fetch()) { ... 


Thank you in advance for your answers and thank you for reading!

Have a good day,

hharchi9.

Configuration: Windows 7 / Chrome 38.0.2125.104

1 réponse

CptRomaiin Posted messages 334 Status Membre 58
 
Hello,

You have two FROM in the first query.
1
hharchi9 Posted messages 693 Status Membre 24
 
Oh yes indeed, thank you :)

However, I only get the results from the first query and not those from the second...
0
CptRomaiin Posted messages 334 Status Membre 58
 
What do the two tables contain?

It should be noted that UNION does not keep duplicates.
0