Skip to content

[ADD] Executes procedures and functions #458

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

supr3m
Copy link

@supr3m supr3m commented Mar 16, 2016

i needed execute a procedure mysql, that's it.

@avbdr
Copy link
Collaborator

avbdr commented Mar 16, 2016

thank you for your contribution. Patch looks very hovewer there are bunch of problems:

  1. You have introduced new functionality but havent updated a readme examples on how to use them.
  2. Patch is incompatible with old php because of [] vs array() usage.
  3. Patch is incompatible with an ArrayBuilder/ObjectBuilder/JsonBuilder() modifiers
  4. Im not sure if you need callFunction() as you still can use get("function(args)")
  5. you are missing new tests for a new functionality

Can you please fix this issues and I will be glad to merge it.

@MPrtenjak
Copy link

MPrtenjak commented Jan 27, 2021

i needed execute a procedure mysql, that's it.

I also needed to send NULL values so I have changed _validParams to support NULL values.

From this:

        foreach ( $params as $key => &$param ) {
                $param = "'". $this->mysqli()->real_escape_string( $param ) ."'";
        }

To this:

        foreach ( $params as $key => &$param ) {
            if ($param)
                $param = "'". $this->mysqli()->real_escape_string( $param ) ."'";
            else
                $param = 'NULL';
        }

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

Successfully merging this pull request may close these issues.

3 participants