[PHP-DEV] PHP 4.0 Bug #2409: tinyint not brought in as integer From: mbushey <email protected>
Date: 09/29/99

From: mbushey <email protected>
Operating system: Linux 2.2.5 !686
PHP version: 4.0 Beta 2
PHP Bug Type: MySQL related
Bug description: tinyint not brought in as integer

 $query="SELECT IDgrp, bit FROM " . $mysql_tablename;
 $res2=mysql_query($query);
 while ($row=mysql_fetch_array($res2)) {
 
 #this should work but does not
 echo $row["bit"] & $row["IDgrp"];

 #changing the var type to integer works
 $a = (int) $row["bit"];
 $b = (int) $row["IDgrp"];
 echo $a & $b;

}

PHP should bring in a MySQL TinyINT as an Integer, right?

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>