We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Database Query '?' Bind is not working when use sql with ':=' operator.
CodeIgniter 4 version v4.0.2
Affected module(s) CodeIgniter\Database\Query (system/Database/Query.php)
Expected behavior, and steps to reproduce if appropriate
i use MySQL 5.7.28 and MySQLi driver.
$db = db_connect(); $sql = 'SELECT @factora := ?, @factorB := ?'; $params = [1,2]; $db->query($sql, $params);
i expected run query. SELECT @factorA := 1, @factorB := 2.
SELECT @factorA := 1, @factorB := 2
but it was run query actually SELECT @factorA := ?, @factorB := ? and occured SQL syntax error.
SELECT @factorA := ?, @factorB := ?
it seem to understand NamedBind because the sql has ':=' operator. so i fix ci4 code temporarily.
system/Database/Query.php :: compileBinds() line 371
$hasNamedBinds = strpos($sql, ':=') === false && strpos($sql, ':') !== false;
i hope solve this problem. thanks.
Context
The text was updated successfully, but these errors were encountered:
Let me have a look
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
Database Query '?' Bind is not working when use sql with ':=' operator.
CodeIgniter 4 version
v4.0.2
Affected module(s)
CodeIgniter\Database\Query (system/Database/Query.php)
Expected behavior, and steps to reproduce if appropriate
i use MySQL 5.7.28 and MySQLi driver.
i expected run query.
SELECT @factorA := 1, @factorB := 2
.but it was run query actually
SELECT @factorA := ?, @factorB := ?
and occured SQL syntax error.
it seem to understand NamedBind because the sql has ':=' operator.
so i fix ci4 code temporarily.
system/Database/Query.php :: compileBinds() line 371
i hope solve this problem.
thanks.
Context
The text was updated successfully, but these errors were encountered: