Skip to content

Instantly share code, notes, and snippets.

@spetroll
Created September 29, 2011 14:44
Show Gist options
  • Save spetroll/1250875 to your computer and use it in GitHub Desktop.
Save spetroll/1250875 to your computer and use it in GitHub Desktop.
CDBCommand::CRow *newrow = NULL;
int wv = row->Field("wiedervorlage")->GetInt();
if (wv > 0) {
CDBCommand swv = CDBCommand(format("SELECT * FROM swvtab WHERE id=%d", wv));
if (swv.Execute())
newrow = swv.FetchRow(CDBCommand::FETCH_NOSELECT);
}
if (newrow == NULL){
CDBCommand swv = CDatastorage::GetActiveDatabase()->SimpleTable("swvtab");
newrow = new CDBCommand::CRow(&swv);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment