How to use the SELECT FROM with 2 conditions

0

Hello, I have a table where I want to show only pending and resolved requests from the state field of my table in my DB.

  $sql = "SELECT * FROM contribuyente WHERE estado ='Pendiente' AND 
  estado='Resuelto' ORDER BY id
    
asked by Daniela 05.06.2018 в 02:37
source

1 answer

0

As conditionals are in the same field, you have to use the where in property, which allows me to query several conditions in a field

 $sql = "SELECT * FROM contribuyente
         WHERE estado in ('Pendiente','Resuelto')  ORDER BY id
    
answered by 05.06.2018 / 02:46
source