Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #31979 : msql_fetch_field() not reporting unique keys
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 8th September 19:04
php-bugs
External User
 
Posts: 1
Default #31979 : msql_fetch_field() not reporting unique keys


From: danielc at ****ysisandsolutions dot com
Operating system: NetBSD 2.0
PHP version: 5CVS-2005-02-15 (dev)
PHP Bug Type: mSQL related
Bug description: msql_fetch_field() not reporting unique keys

Description:
------------
One of the properties returned by msql_fetch_field() is "unique". It is
supposed to contain 1 if the column in question is part of a unique key
and 0 if it's not. But it always returns 0.

Reproduce code:
---------------
$con = msql_connect();
$db = msql_select_db('ptdb', $con);
msql_query('CREATE TABLE blah (i INT)', $con);
msql_query('CREATE UNIQUE INDEX bi ON blah (i)', $con);
$result = msql_query('SELECT * FROM blah', $con);
$info = msql_fetch_field($result);
print_r($info);
msql_query('DROP TABLE blah', $con);

Expected result:
----------------
stdClass Object
(
[name] => i
[table] => blah
[not_null] => 0
[unique] => 1
[type] => int
)

Actual result:
--------------
stdClass Object
(
[name] => i
[table] => blah
[not_null] => 0
[unique] => 0
[type] => int
)

--
Edit bug report at http://bugs.php.net/?id=31979&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31979&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31979&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31979&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31979&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31979&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31979&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31979&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31979&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31979&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31979&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31979&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31979&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31979&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31979&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31979&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31979&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31979&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31979&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31979&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31979&r=mysqlcfg
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666