Bug #16383: mysql_fetch_assoc returns strings only
| From: | suraev at tut dot by | Date: | Mon, 01 Apr 2002 21:30:06 +0000 |
| Subject: | Bug #16383: mysql_fetch_assoc returns strings only | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-3764@lists.php.net to get a copy of this message | ||
From: suraev@tut.by
Operating system: Win2000
PHP version: 4.1.1
PHP Bug Type: MySQL related
Bug description: mysql_fetch_assoc returns strings only
Hello,
I found a strange behaviour while was working with mysql_fetch_array and
mysql_fetch_assoc.
Even if table has an integer field, the result I got from functions listed
above will list this value as string.
php.ini
magic_quotes_runtime = Off
simple example.
imagine that we
"create table tripreport (ID tinyint)"
then we "insert into MYTABLE (ID) values (1)"
then $r="select * from MYTABLE where ID=1"
then $f=mysql_fetch_assoc($r);
then $id=$f["ID"];
then echo gettype($id) will print "string".
is it an internal MySQL bug of PHP makes a mistake?
take care, Val
--
Edit bug report at http://bugs.php.net/?id=16383&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16383&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16383&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16383&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16383&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16383&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16383&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16383&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16383&r=submittedtwice