PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » DB » Bug #3691

mssql: tableInfo - no propertys for flags

Details

Submitted2005-03-03 17:08 UTC
Frommail at fzietlow dot de
Assigneddanielc
StatusClosed
PackageDB
PHP Version4.3.9
OSLinux (Apache 2.0.48)
Roadmaps(Not assigned)

Comments

[2005-03-03 17:08 UTC] mail at fzietlow dot de

Description:
------------
i like to get some informations of fields from some tables on a mssql database. the most ist quite good but te info of the flag field isn't correct.
the function _mssql_field_flags become only the table name (both two parameters). the second shoud be the fieldname...

and sorry for this englisch... ;)

Reproduce code:
---------------
for ($i = 0; $i < $count; $i++) {
$field_name = $case_func(@mssql_field_name($id, $i));

$res[$i] = array(
'table' => $got_string ? $case_func($result) : '',
'name' => $field_name,
'type' => @mssql_field_type($id, $i),
'len' => @mssql_field_length($id, $i),
// We only support flags for table
'flags' => $got_string
? $this->_mssql_field_flags($result,
$case_func($field_name))
: '',
);

Expected result:
----------------
the right flags of a field. like primary_key, auto_increment...

Actual result:
--------------
-

[2005-03-03 17:13 UTC] mail at fzietlow dot de

The Actual result:
-----------------

There are some strange results of the fields.
the result is correct if the field name equal table name but
this is only one of a table... [:

[2005-03-03 17:17 UTC] mail at fzietlow dot de

And...

Under "Reproduce code:" is the solution - it's a little bug.
This must pased on mssql.php line 747.