Doc #60691 [NEW]: ->def missing default value
| From: | bimal at sanjaal dot com | Date: | Mon, 09 Jan 2012 10:30:42 +0000 |
| Subject: | Doc #60691 [NEW]: ->def missing default value | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-7756@lists.php.net to get a copy of this message | ||
From:
Operating system: Windows XP
PHP version: Irrelevant
Package: MySQL related
Bug Type: Documentation Problem
Bug description:->def missing default value
Description:
------------
---
From manual page:
http://www.php.net/function.mysql-fetch-field#refsect1-function.mysql-fetch-field-returnvalues
---
http://www.w3schools.com/php/func_mysql_fetch_field.asp
(Purpose: Some reference back to $meta->def)
The field - def - does not contain the default value of the mysql column -
even if the default values were defined in the table.
(PS - The new/upgraded version of PHP manual simply hide this field)
I have used PHP 5.3.5 from XAMPP 1.7 version.
Test script:
---------------
type: $meta->type
default: $meta->def
unique_key: $meta->unique_key
Here, the default value is always missing or returning empty variable.
Expected result:
----------------
Default value assiged to the mysql column while creating it using: DEFAULT
'XXX'.
For example,
is_active enum('N','Y') NOT NULL DEFAULT 'N' COMMENT
'Active record?',
Here, for the field is_active, we should have seen 'N'
--
Edit bug report at https://bugs.php.net/bug.php?id=60691&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60691&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60691&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60691&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=60691&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60691&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=60691&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=60691&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=60691&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=60691&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=60691&r=support
Expected behavior: https://bugs.php.net/fix.php?id=60691&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=60691&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=60691&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=60691&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60691&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=60691&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=60691&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=60691&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=60691&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=60691&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=60691&r=mysqlcfg