PHP-MySQLi-Database-Class
PHP-MySQLi-Database-Class copied to clipboard
[ADD] Executes procedures and functions
i needed execute a procedure mysql, that's it.
thank you for your contribution. Patch looks very hovewer there are bunch of problems:
- You have introduced new functionality but havent updated a readme examples on how to use them.
- Patch is incompatible with old php because of [] vs array() usage.
- Patch is incompatible with an ArrayBuilder/ObjectBuilder/JsonBuilder() modifiers
- Im not sure if you need callFunction() as you still can use get("function(args)")
- you are missing new tests for a new functionality
Can you please fix this issues and I will be glad to merge it.
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';
}