bool SQLFunctions
::pesquisaTabelaTendencia(QString passagem,
int inicio,
int fim
) {
if (global_query->exec("SELECT DATE_FORMAT(ev_datetime, '%d-%m-%Y'), TIME(ev_datetime),"
"EV_VALOR_ECG, EV_VALOR_RESP, EV_VALOR_OXI, EV_VALOR_TEMP1, EV_VALOR_TEMP2, EV_VALOR_PI1, EV_VALOR_PI2, "
"EV_VALOR_PNI, EV_VALOR_CAP, EV_VALOR_ST_I, EV_VALOR_ST_II, EV_VALOR_ST_III, EV_VALOR_ST_aVR, EV_VALOR_ST_aVL, EV_VALOR_ST_aVF, EV_VALOR_ST_V "
"FROM tendencia_1_5 "
"WHERE pt_passagem_prontuario = '" + passagem + "' "
"ORDER BY ev_datetime DESC LIMIT " + QString::number(inicio
) + ", " + QString::number(fim
))) {
qDebug() << "Deu certo" << global_query->isActive() << global_query->isValid() << global_query->isSelect();
global_query->first();
qDebug() << "Deu certo" << global_query->isActive() << global_query->isValid() << global_query->isSelect();
if (global_query->first())
return true;
else
return false;
}
}
bool SQLFunctions::pesquisaTabelaTendencia(QString passagem, int inicio, int fim)
{
if (global_query->exec("SELECT DATE_FORMAT(ev_datetime, '%d-%m-%Y'), TIME(ev_datetime),"
"EV_VALOR_ECG, EV_VALOR_RESP, EV_VALOR_OXI, EV_VALOR_TEMP1, EV_VALOR_TEMP2, EV_VALOR_PI1, EV_VALOR_PI2, "
"EV_VALOR_PNI, EV_VALOR_CAP, EV_VALOR_ST_I, EV_VALOR_ST_II, EV_VALOR_ST_III, EV_VALOR_ST_aVR, EV_VALOR_ST_aVL, EV_VALOR_ST_aVF, EV_VALOR_ST_V "
"FROM tendencia_1_5 "
"WHERE pt_passagem_prontuario = '" + passagem + "' "
"ORDER BY ev_datetime DESC LIMIT " + QString::number(inicio) + ", " + QString::number(fim)))
{
qDebug() << "Deu certo" << global_query->isActive() << global_query->isValid() << global_query->isSelect();
global_query->first();
qDebug() << "Deu certo" << global_query->isActive() << global_query->isValid() << global_query->isSelect();
if (global_query->first())
return true;
else
return false;
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks