Doc #63058 [Opn->Wfx]: Change of: "Example #1 mysql_select_db() example"

From: Date: Tue, 11 Sep 2012 01:53:31 +0000
Subject: Doc #63058 [Opn->Wfx]: Change of: "Example #1 mysql_select_db() example"
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8851@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63058&edit=1

 ID:                 63058
 Updated by:         aharvey@php.net
 Reported by:        jangirke at gmail dot com
 Summary:            Change of: "Example #1 mysql_select_db() example"
-Status:             Open
+Status:             Wont fix
 Type:               Documentation Problem
 Package:            Documentation problem
 Operating System:   Irrelevant
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

I don't see how that would improve the example. In general, manual pages aren't intended
to stand completely alone: the fact that mysql_connect() returns a resource is documented on the
mysql_connect() page (which is itself linked in the See Also section), and the basics of function
calls and PHP syntax are covered earlier in the manual. It's impractical to document those
sorts of things on an example-by-example basis.

Marking won't fix.


Previous Comments:
------------------------------------------------------------------------
[2012-09-10 23:24:11] jangirke at gmail dot com

Description:
------------
---
From manual page: http://www.php.net/function.mysql-select-db#refsect1-function.mysql-select-db-examples
---
SUBSTITUTE
// make foo the current db
$db_selected = mysql_select_db('foo', $link);
if (!$db_selected) {
    die ('Can\'t use foo : ' . mysql_error());
WITH
//Tell what is inside $link. Does $link call the function mysql_connect('localhost',
'mysql_user', 'mysql_password') or the return values?
$db_selected = mysql_select_db('DatabaseName', $link);
if (!$db_selected) {
    die ('Unable to connect to database.' . mysql_error());



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63058&edit=1


Thread (2 messages)

« previous php.doc.bugs (#8851) next »