If the values you get back from the database are strings, but the original datatype is integer, then you probably want your DAO (Data Access Object, or whatever it is that's pulling the data) to cast things to data types you expect. That way, the PHP code that's looking at the values is looking at the data type it expects.
The trouble is, of course, that there isn't a 1-1 correspondence between the data types the DB defines, and the data types PHP defines. However, for the most part this isn't a problem, since there's equivalent types for most of the types we use normally: int, float, bool, string.
The upshot is, that between the place where you query the database, and the place where you check those values, those values should be cast to the data types you expect. I just tested with mysql_fetch_object() on a MySQL table containing an int(10) and a varchar(50); both fields always were pulled in as type "string" by PHP. So if you want one of the fields treated as an int, cast it to an int before you do anything with it. For example:
$rs = mysql_query("SELECT * FROM table");
while ($row = mysql_fetch_object($rs)) {
$RealRow->id = (int)$row->id;
$RealRow->name = $row->name;
// etc.
}
// ... later ...
if ($RealRow->status == 0) {
// do something
}
The query and RealRow stuff should be inside a class/method, so that it's encapsulated; that way, ANY part of your code that gets data from table
will always get the $RealRow object instead, which will have everything set to the proper data types. Of course, if you change your data types, this requires manually editing the DAO to deal with the casting; it would also be possible to query the DB to get the type of each field (with a "SHOW COLUMNS FROM table"), and automatically cast the fields to the proper data type.