CodeIgniter Forums

Full Version: BasePreparedQuery to include "execute" method with an array argument
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I hope this suggestion is something visible and make sense.
I would like to suggest to add functionality to execute prepare query by passing an array argument.
This would be additional method to the existing "execute" - where it is usingĀ variable-length argument list.

Unless if there is other way that I'm not aware of, the suggestion would be helping a lotĀ in generating a dynamic prepared query.
To describe more, in "BasePreparedQuery" class:
Code:
public function execute(...$data)
{
...
}

The suggestion is to have something like this:
Code:
public function executeArray($data)
{
...
}

Thank you & BR,
You can write like this:
PHP Code:
$array = [012];
execute(...$array); 

See https://3v4l.org/6vUTL