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

Booleans #9

Open
taai opened this issue May 16, 2012 · 0 comments
Open

Booleans #9

taai opened this issue May 16, 2012 · 0 comments

Comments

@taai
Copy link

taai commented May 16, 2012

In PostgreSQL the booleans are shown as strings "t" and "f" (null's are ok) and they are not getting casted to PHP's booleans.
Fix would be something like this:

if ($type === 'boolean')
{
    if ($value === 't')
    {
        $value = TRUE;
    }
    elseif ($value === 'f')
    {
        $value = FALSE;
    }
}

Is it possible to cast it right after fetching the row?

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