Skip to content

mysql_fetch_field if $field_offset == 0  #13

Open
@paolobia

Description

@paolobia

check this changes

if $field_offset== 0
mysqli_field_seek is not call and
mysqli_fetch_field fail

function mysql_fetch_field(mysqli_result $result, $field_offset = -1)
{
		if ($field_offset>=0) {
			mysqli_field_seek($result, $field_offset);
		}

        $foo = mysqli_fetch_field($result);

        // increase mysql_fetch_field compatibility ;-)
        if ($foo->flags & 2) $foo->primary_key = 1;
        if ($foo->flags & 4) $foo->unique_key = 1;

	return $foo;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions