Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql_fetch_field if $field_offset == 0 #13

Open
paolobia opened this issue Aug 9, 2021 · 0 comments
Open

mysql_fetch_field if $field_offset == 0 #13

paolobia opened this issue Aug 9, 2021 · 0 comments

Comments

@paolobia
Copy link

paolobia commented Aug 9, 2021

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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant