[SQL]Fatal error in the query

Solved
hharchi9 Posted messages 693 Status Member -  
hharchi9 Posted messages 693 Status Member -
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 answer

  1. CptRomaiin Posted messages 334 Status Member 58
     
    Hello,

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

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

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