ID:               36579
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: windows
 PHP Version:      5.1.2
 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.

Jakub Vrana checked in the patch this morning.


Previous Comments:
------------------------------------------------------------------------

[2006-03-02 02:05:09] [EMAIL PROTECTED]

Patch: http://php.is/bugs/36579/phpdoc-mysql.patch.txt

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

[2006-03-02 01:50:08] [EMAIL PROTECTED]

http://dev.mysql.com/doc/refman/5.0/en/c-api-datatypes.html

"unsigned long length:
The width of the field, as specified in the table definition."


"unsigned long max_length:
The maximum width of the field for the result set (the length of the
longest field value for the rows *actually in the result set*)..."

Since you have no data in there max_length is expected to be zero

Reclassified as documentation bug

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

[2006-03-01 23:33:07] [EMAIL PROTECTED]

Description:
------------
mysqli seems to return the length of the column inside the undocumented
"length" property, whereas max_length seems to be 0 all the time ..

Reproduce code:
---------------
CREATE TABLE `users` (
  `user_name` char(12) default NULL,
  `user_password` text,
  `subscribed` tinyint(4) default NULL,
  `user_id` int(11) NOT NULL default '0',
  `quota` decimal(18,2) default NULL,
  `weight` double default NULL,
  `access_date` date default NULL,
  `access_time` time default NULL,
  `approved` datetime default NULL,
  UNIQUE KEY `users_id_index_idx` (`user_id`)
);

Actual result:
--------------
name:    user_name
max_length: 0
length: 12
type:    254

name:    user_password
max_length: 0
length: 65535
type:    252

name:    subscribed
max_length: 0
length: 4
type:    1

name:    user_id
max_length: 0
length: 11
type:    3

name:    quota
max_length: 0
length: 20
type:    246

name:    weight
max_length: 0
length: 22
type:    5

name:    access_date
max_length: 0
length: 10
type:    10

name:    access_time
max_length: 0
length: 8
type:    11

name:    approved
max_length: 0
length: 19
type:    12


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


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

Reply via email to