how to consult 2 different results in the same column?

1

I am trying to make a query, where in the same column I have two different states, I explain them

column = states state 1 state 2

my code for

$auc = "SELECT * FROM resultados WHERE estados=1";
    $au_count = $conexion->query($auc);
    while( $count_row = $au_count->fetch_array() )
    { 


        $pubAsig=$count_row['estados'];



    }

What I want to achieve here is to show both result 1 and result 2 in the same query, but both are in the same column and I can not locate them.

    
asked by Alexander Quiroz 27.06.2016 в 16:03
source

1 answer

4
$sql = "SELECT * FROM resultados WHERE estados=1 OR estados=2";
$au_count = $conexion->query($sql);

while ($count_row = $au_count->fetch_array()) { 

    // Mostrar aquí los campos necesarios.  

} 
    
answered by 27.06.2016 / 16:48
source