[eluser]fnick[/eluser]
Following code retrieves value of a TINYINT-type field as string:
Code:
$row = $result->row_array();
$val = $row['colname'];
So I have to cast it to integer before the value can be safely compared to 1 with "===" operator.
Code:
if ((int)$val === 1)
{
// code
}
Is it wrong to expect an integer at this point?