Skip to content

About mysqli options MYSQLI_OPT_INT_AND_FLOAT_NATIVE #1979

Description

@viosion

I am sorry to post the question here. I can't open the forum, I think because the Chinese network has blocked some websites, such as google. I have no time to configure a vpn recently.

Describe the bug
I have a problem, MySQL query results need to return integer and float, but mysql 5.7 defaults to return integer and float as a string type. So I need to use a configuration, MYSQLI_OPT_INT_AND_FLOAT_NATIVE. In CodeIgniter 3, I can do this:
$db->conn_id->options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, TRUE);
But CodeIgniter 4, this method is no longer useful.
$db->connID->options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, TRUE);
This doesn't work either.

I want to know, there is any good way to use mysqli's options directly, without changing the framework source.

In addition, regarding MYSQLI_OPT_INT_AND_FLOAT_NATIVE, can you consider making a configurable item and implementing it directly in the Mysqli driver.

CodeIgniter 4 version
CodeIgniter 4.0.0 beta.2

Context

  • OS: Mac OS 10.14.4
  • Web server [Nginx 1.13.2]
  • PHP version [7.2.14]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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