Queries are made through queries prepared from mysqli, variable $previa
can bring two types of results yes
or not
The query is made by means of data related to an example:
id articulo previa id_articulo
1 algo yes 2
2 algo1 yes 2
As you can see, results of the same article id are included.
And the results are as follows:
something - > not something1 - > not
But it should be this way since in the database this data as yes
something - > And it is something1 - > yes
Note: But if I get to change the value
yes
bynot
there if it shows the result it should show, but everything is doing the other way around.
I am using the following code:
if($previa!="yes"){
echo $articulo;
echo 'yes';
} else {
echo $articulo;
echo 'not';
}