#34828 [Bgs]: new mysqli_result($mysql); doesn't return expected instance

2005-10-14 Thread [EMAIL PROTECTED]
 ID:   34828
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: MySQLi related
 Operating System: Windows XP Pro SP2
 PHP Version:  5.0.5
 New Comment:

Tested the latest 5.0.6-dev from snaps.php.net

$mysql = new mysqli($host, $user, $passwd);
$mysql-real_query(SELECT 'foo' FROM DUAL);
$myresult = new mysqli_result($mysql);
$row = $myresult-fetch_row();
$myresult-close();
$mysql-close();

And it fails the test. (Couldn't fetch mysqli_result...)


Previous Comments:


[2005-10-11 15:54:45] [EMAIL PROTECTED]

Oups, a mistake in my previous comment. I ment:

This works:

$mysql = new mysqli('localhost', 'root', '', 'test');
$result = $mysql-query(SELECT 'test');
$row = $result-fetch_row();

And this doesn't:

$mysql = new mysqli('localhost', 'root', '', 'test');
$mysql-query(SELECT 'test');
$result = new mysqli_result($mysql);
$row = $result-fetch_row();

---

$mysql-real_query('...'); is not relevant to this problem.



[2005-10-11 15:29:36] [EMAIL PROTECTED]

Use $mysql-real_query() if you want to create mysqli_result instance
yourself.
No bug here, that's how it works.



[2005-10-11 15:12:29] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip



[2005-10-11 15:10:14] [EMAIL PROTECTED]

This works:

$mysql = new mysqli('localhost', 'root', '', 'test');
$mysql-query(SELECT 'test');
$result = new mysqli_result($mysql);
$row = $result-fetch_row();

And this doesn't:

$mysql = new mysqli('localhost', 'root', '', 'test');
$result = $mysql-query(SELECT 'test');
$row = $result-fetch_row();



[2005-10-11 15:07:14] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34828

-- 
Edit this bug report at http://bugs.php.net/?id=34828edit=1


#34828 [Bgs]: new mysqli_result($mysql); doesn't return expected instance

2005-10-14 Thread [EMAIL PROTECTED]
 ID:   34828
 User updated by:  [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
 Status:   Bogus
 Bug Type: MySQLi related
 Operating System: Windows XP Pro SP2
 PHP Version:  5.0.5
 New Comment:

With PHP-5.1.0RC1 works ok though.


Previous Comments:


[2005-10-14 16:31:44] [EMAIL PROTECTED]

Tested the latest 5.0.6-dev from snaps.php.net

$mysql = new mysqli($host, $user, $passwd);
$mysql-real_query(SELECT 'foo' FROM DUAL);
$myresult = new mysqli_result($mysql);
$row = $myresult-fetch_row();
$myresult-close();
$mysql-close();

And it fails the test. (Couldn't fetch mysqli_result...)



[2005-10-11 15:54:45] [EMAIL PROTECTED]

Oups, a mistake in my previous comment. I ment:

This works:

$mysql = new mysqli('localhost', 'root', '', 'test');
$result = $mysql-query(SELECT 'test');
$row = $result-fetch_row();

And this doesn't:

$mysql = new mysqli('localhost', 'root', '', 'test');
$mysql-query(SELECT 'test');
$result = new mysqli_result($mysql);
$row = $result-fetch_row();

---

$mysql-real_query('...'); is not relevant to this problem.



[2005-10-11 15:29:36] [EMAIL PROTECTED]

Use $mysql-real_query() if you want to create mysqli_result instance
yourself.
No bug here, that's how it works.



[2005-10-11 15:12:29] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip



[2005-10-11 15:10:14] [EMAIL PROTECTED]

This works:

$mysql = new mysqli('localhost', 'root', '', 'test');
$mysql-query(SELECT 'test');
$result = new mysqli_result($mysql);
$row = $result-fetch_row();

And this doesn't:

$mysql = new mysqli('localhost', 'root', '', 'test');
$result = $mysql-query(SELECT 'test');
$row = $result-fetch_row();



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/34828

-- 
Edit this bug report at http://bugs.php.net/?id=34828edit=1