IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 26, 2010, 9:12:02 AM (16 years ago)
Author:
bills
Message:

Get the 'webrequest number' frm the database

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/pstamptool.c

    r27969 r28106  
    5353static bool updatedependentMode(pxConfig *config);
    5454static bool revertdependentMode(pxConfig *config);
     55static bool getwebrequestnumMode(pxConfig *config);
    5556
    5657# define MODECASE(caseName, func) \
     
    9596        MODECASE(PSTAMPTOOL_MODE_UPDATEDEPENDENT, updatedependentMode);
    9697        MODECASE(PSTAMPTOOL_MODE_REVERTDEPENDENT, revertdependentMode);
     98        MODECASE(PSTAMPTOOL_MODE_GETWEBREQUESTNUM, getwebrequestnumMode);
    9799        default:
    98100            psAbort("invalid option (this should not happen)");
     
    13341336    return true;
    13351337}
     1338
     1339static bool getwebrequestnumMode(pxConfig *config)
     1340{
     1341    PS_ASSERT_PTR_NON_NULL(config, false);
     1342
     1343    if (!pstampWebRequestInsert(config->dbh, 0 )) {
     1344        psError(PS_ERR_UNKNOWN, false, "failed to insert pstampWebRequest");
     1345        return false;
     1346    }
     1347
     1348    psS64 req_id = psDBLastInsertID(config->dbh);
     1349
     1350    printf("%" PRId64 "\n", req_id);
     1351
     1352    return true;
     1353}
Note: See TracChangeset for help on using the changeset viewer.