php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #27369 RFE change in function.mysql-fetch-array.html
Submitted: 2004-02-23 13:07 UTC Modified: 2004-02-24 02:54 UTC
From: nospam at webdragon dot net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Linux (Fedora Core 1)
Private report: No CVE-ID: None
 [2004-02-23 13:07 UTC] nospam at webdragon dot net
Description:
------------
Following is a patch to the documentation to make the aliasing issue slightly clearer. I (in my caffeine deprived state) not only failed to realize that you were referring to aliasing via mysql, but didn't notice that the query below was doing that very thing in mysql. 

This patch makes this slightly clearer. (hopefully linewrapping won't bollix this)



Reproduce code:
---------------
--- function.mysql-fetch-array.html     2004-02-08 16:43:54.000000000 -0500
+++ function.mysql-fetch-array.new.html 2004-02-23 13:08:26.000000000 -0500
@@ -144,7 +144,7 @@
 ></A
 ><P
 ><B
->Example 1. Query with duplicate field names</B
+>Example 1. Query with aliased duplicate field names</B
 ></P
 ><TABLE
 BORDER="0"
@@ -154,7 +154,7 @@
 ><TD
 ><PRE
 CLASS="sql"
->select table1.field as foo, table2.field as bar from table1, table2</PRE
+>SELECT table1.field AS foo, table2.field AS bar FROM table1, table2</PRE
 ></TD
 ></TR
 ></TABLE
@@ -432,4 +432,4 @@
 ></DIV
 ></BODY
 ></HTML
->
\ No newline at end of file
+>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-23 15:05 UTC] nlopess@php.net
I don't see any interess in this patch, as nothing is changed.
 [2004-02-23 15:21 UTC] nospam at webdragon dot net
on the contrary, what's changed is _clarity_

it's either this, or TWO SQL queries, thus: 

  1. Query with duplicate field names
  SELECT t1.field, t2.field FROM t1, t2

  2. Query with aliased duplicate field names
  SELECT t1.field AS foo, t2.field AS bar FROM t1, t2

since the Query presented in the existing docs is quite obviously one that does _not_ have duplicate field names in the result, since they are _already aliased in the example presented_, therefore the requested change. It presents the information in a slightly clearer manner with a minimum of additional bytes of info and is less confusing. 

Lest you forget, this documentation is not for people who already KNOW what you're talking about intimately. It's for people who haven't got a clue (or haven't had their coffee yet). The more clearly you can present your instructions, the fewer stupid questions and confused users you'll have. QED
 [2004-02-24 02:54 UTC] vrana@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 19:01:28 2024 UTC