Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Can't use bind(Int|String|DoubleBlob) methods on unnamed parameters #14

Open
adrianhardy opened this issue Jan 31, 2014 · 0 comments
Open

Comments

@adrianhardy
Copy link
Contributor

$stmt = $db->prepare("SELECT * FROM tblTable WHERE intStuff = ?");
$stmt->bindInt(1, 9);
$stmt->fetchOne();

Falls through to:

private function process($arr_params = NULL)
{
       if (NULL === $arr_params) {
            if ($this->int_state === self::STATE_BOUND) {
                $str_sql = preg_replace_callback("/\?(\w+)/", array($this, 'replaceTypedParams'), $this->str_prepare_sql);

But the preg_replace_callback will find nothing and therefore no params are bound. Looking into reasonable fixes....

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant