mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-21 22:04:56 -06:00
PGSQL: Escaping ? as ??
git-svn-id: svn://ultimatepp.org/upp/trunk@13737 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3706baffdb
commit
24628d4632
1 changed files with 10 additions and 4 deletions
|
|
@ -513,11 +513,17 @@ bool PostgreSQLConnection::Execute()
|
|||
s = PostgreSQLReadString(s, query);
|
||||
else {
|
||||
if(*s == '?' && !noquestionparams) {
|
||||
if(pi >= param.GetCount()) {
|
||||
session.SetError("Invalid number of parameters", statement);
|
||||
return false;
|
||||
if(s[1] == '?') {
|
||||
query.Cat('?');
|
||||
s++;
|
||||
}
|
||||
else {
|
||||
if(pi >= param.GetCount()) {
|
||||
session.SetError("Invalid number of parameters", statement);
|
||||
return false;
|
||||
}
|
||||
query.Cat(param[pi++]);
|
||||
}
|
||||
query.Cat(param[pi++]);
|
||||
}
|
||||
else
|
||||
query.Cat(*s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue