Can somebody explain me why does this mysql query

SELECT * FROM mytable WHERE F='d2f2' AND Tot>Pmin AND Tot<Pmax

omit this row

ID ¦IDa¦F ¦Pmax¦Pmin¦Tot

124¦160¦d2f2¦200 ¦12 ¦182


Is the data types are identical on columns Pmin, Pmax and Tot?

Yes it's all INT

I did it in MS SQL and got the expected results. Is it possible that the actual value of F iin the table is 'd2f2 ' or some such instead of 'd2f2'? Try the query

SELECT * FROM mytable WHERE F LIKE '%d2f2%' AND Tot > Pmin AND Tot < Pmax


SELECT * FROM mytable WHERE F = 'd2f2'

and see what you get

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.