To be sure to compare integer value, you can use intval(Q0.NAOK) > 50
, just remember if Q0.NAOK is not a number (empty or a string), then intval(Q0.NAOK) == 0. To compare string value ("A" < "B") use strcmp directly : strcmp(Q0.NAOK,"B")
or strcmp(Q0.NAOK,"A5")
.