git-svn-id: svn://10.0.0.236/trunk@139751 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jkeiser%netscape.com
2003-03-19 06:26:49 +00:00
parent 7b319b420a
commit 2671dde487
4 changed files with 11 additions and 7 deletions

View File

@@ -210,7 +210,7 @@ mozSqlConnectionPgsql::RealExec(const nsAString& aQuery,
else if (stat == PGRES_COMMAND_OK) {
if (!aAffectedRows)
return NS_ERROR_NULL_POINTER;
sscanf(PQcmdTuples(r), "%d", aAffectedRows);
PR_sscanf(PQcmdTuples(r), "%d", aAffectedRows);
mLastID = PQoidValue(r);
}
else {

View File

@@ -1,3 +1,5 @@
#include "prprf.h"
#include "nsReadableUtils.h"
#include "mozSqlResultPgsql.h"
@@ -38,7 +40,7 @@ mozSqlResultPgsql::GetColType(PRInt32 aColumnIndex)
for (PRInt32 i = 0; i < PQntuples(mTypes); i++) {
char* value = PQgetvalue(mTypes, i, 0);
PRInt32 o;
sscanf(value, "%d", &o);
PR_sscanf(value, "%d", &o);
if (o == oid) {
char* type = PQgetvalue(mTypes, i, 1);
if (! strcmp(type, "int2"))
@@ -106,11 +108,11 @@ mozSqlResultPgsql::BuildRows()
if (type == mozISqlResult::TYPE_STRING)
cell->SetString(ToNewUnicode(NS_ConvertUTF8toUCS2(value)));
else if (type == mozISqlResult::TYPE_INT)
sscanf(value, "%d", &cell->mInt);
PR_sscanf(value, "%d", &cell->mInt);
else if (type == mozISqlResult::TYPE_FLOAT)
sscanf(value, "%f", &cell->mFloat);
PR_sscanf(value, "%f", &cell->mFloat);
else if (type == mozISqlResult::TYPE_DECIMAL)
sscanf(value, "%f", &cell->mFloat);
PR_sscanf(value, "%f", &cell->mFloat);
else if (type == mozISqlResult::TYPE_DATE ||
type == mozISqlResult::TYPE_TIME ||
type == mozISqlResult::TYPE_DATETIME)