#50536 [Opn->Csd]: code error(select db)
| From: | degeberg@php.net | Date: | Sun, 20 Dec 2009 20:38:22 +0000 |
| Subject: | #50536 [Opn->Csd]: code error(select db) | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-3522@lists.php.net to get a copy of this message | ||
ID: 50536
Updated by: degeberg@php.net
Reported By: greenfish629_ at hotmail dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Linux Ubuntu 9.04
PHP Version: 5.3.1
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2009-12-20 20:38:04] svn@php.net
Automatic comment from SVN on behalf of degeberg
Revision: http://svn.php.net/viewvc/?view=revision&revision=292375
Log: Fixed #50536.
------------------------------------------------------------------------
[2009-12-20 13:16:31] rasmus@php.net
That would be a documentation issue then..
------------------------------------------------------------------------
[2009-12-20 07:18:40] greenfish629_ at hotmail dot com
Description:
------------
Where is mysql_select_db ?
Reproduce code:
---------------
---
From manual page: function.mysql-result#23
---
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$result = mysql_query('SELECT name FROM work.employee');
/*Added by USER*/
mysql_select_db('test');
/**************/
if (!$result) {
die('Could not query:' . mysql_error());
}
echo mysql_result($result, 2); // outputs third employee's name
mysql_close($link);
?>
Expected result:
----------------
Christoper Lamm
// this is just example..
Actual result:
--------------
Could not query:No database selected
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50536&edit=1