#29582 [NEW]: The Bug on if()
| From: | mydwin at msn dot com | Date: | Mon, 09 Aug 2004 06:43:19 +0000 |
| Subject: | #29582 [NEW]: The Bug on if() | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-64293@lists.php.net to get a copy of this message | ||
From: mydwin at msn dot com
Operating system: Windows 2003 Enterprise
PHP version: 5.0.0
PHP Bug Type: MySQL related
Bug description: The Bug on if()
Description:
------------
-= The SQL is =-
CREATE TABLE
test (
id int(10) unsigned NOT NULL auto_increment,
Name varchar(50) collate utf8_bin NOT NULL default '',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=5 ;
INSERT INTO test VALUES (1, 0x61);
INSERT INTO test VALUES (2, 0x62);
INSERT INTO test VALUES (3, 0x63);
INSERT INTO test VALUES (4, 0x64);
-= the test.php code is =-
<pre><?php
$iFromID = $_POST["FromID"]|0;
$iToID = $_POST["ToID"]|0;
$DB = new mysqli( "localhost", "root", "", "testDB" );
if( $Temp_From=$DB->query( "SELECT * FROM test WHERE id=$iFromID"
)->fetch_assoc() && $Temp_To=$DB->query( "SELECT * FROM test WHERE
id=$iToID" )->fetch_object() )
{
print_r($Temp_From);
echo "\n\n\n";
print_r($Temp_To);
}
?>
<form method="post" action="test.php">
<input name="FromID" value="1" /> <input name="ToID"
value="2" />
<input type="submit" value="Submit" /> <input type="reset"
value="Reset"
/>
</form>
</pre>
Expected result:
----------------
Array
(
[id] => 1
[Name] => a
)
stdClass Object
(
[id] => 2
[Name] => b
)
Actual result:
--------------
1
stdClass Object
(
[id] => 2
[Name] => b
)
--
Edit bug report at http://bugs.php.net/?id=29582&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29582&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29582&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29582&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29582&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29582&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29582&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29582&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29582&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29582&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29582&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29582&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29582&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29582&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29582&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29582&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29582&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29582&r=float