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
Sparrow is not quoting the queries automatically.
When i execute this code: $db->from($table)->where($where)->select()->many();
$db->from($table)->where($where)->select()->many();
with these parameters:
$table = 'produtos'; $where = [ 'codigo' => 99, ];
it gives me this SQL: SELECT * FROM produtos WHERE codigo=99
SELECT * FROM produtos WHERE codigo=99
and it returns me this:
Array ( [0] => Array ( [id] => 478 [codigo] => 99KIT03 [saldo] => 3 [descricao] => Kit 03 - Carregador ) [1] => Array ( [id] => 477 [codigo] => 99 [saldo] => 1 [descricao] => Carregador ) )
Now, when i execute this: (with the same parameters) $db->from($table)->where($where)->select()->one();
$db->from($table)->where($where)->select()->one();
it returns me the wrong result, it returns the item with "codigo" "99KIT03", not the "99", because the values of the query are not quoted.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Sparrow is not quoting the queries automatically.
When i execute this code:
$db->from($table)->where($where)->select()->many();
with these parameters:
it gives me this SQL:
SELECT * FROM produtos WHERE codigo=99
and it returns me this:
Now, when i execute this: (with the same parameters)
$db->from($table)->where($where)->select()->one();
it returns me the wrong result, it returns the item with "codigo" "99KIT03", not the "99", because the values of the query are not quoted.
The text was updated successfully, but these errors were encountered: