#28612 [Opn->Bgs]: Illegal offset type with mySQLi
| From: | pollita@php.net | Date: | Wed, 02 Jun 2004 23:00:30 +0000 |
| Subject: | #28612 [Opn->Bgs]: Illegal offset type with mySQLi | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-60294@lists.php.net to get a copy of this message | ||
ID: 28612
Updated by: pollita@php.net
Reported By: jsgoupil at lookstrike dot com
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: WinXP
PHP Version: 5.0.0RC2
New Comment:
Resources cannot be used as array offsets. This is just as true of
mysql_connect() as it is of mysqli_connect().
Previous Comments:
------------------------------------------------------------------------
[2004-06-02 23:08:09] jsgoupil at lookstrike dot com
Description:
------------
When trying to put a ressource of mySQLi in the index of an array, i
get the following error : Warning: Illegal offset type in ...
I'm running PHP5.0.0RC2 and trying to connect a mySQL4.1 server.
When i try to connect the php_mysql.dll (not advanced) to another
server, i don't get the "illegal offset" with the same code.
(mysql_connect function)
Reproduce code:
---------------
<?php
$link =
mysqli_connect("localhost","lookstrike","*****","lookstrike_local");
$query = mysqli_query($link,"SELECT player_id FROM ls_players");
$something = array();
$something[$query] = "1";
mysqli_close($link);
?>
Expected result:
----------------
It supposed to work like mySQL (not avanced)
Actual result:
--------------
Warning: Illegal offset type in ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=28612&edit=1