IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10044


Ignore:
Timestamp:
Nov 17, 2006, 12:06:57 PM (19 years ago)
Author:
jhoblitt
Message:

add psDBAffectedRows()

Location:
trunk/psLib/src/db
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/db/psDB.c

    r10008 r10044  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.113 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2006-11-16 00:38:48 $
     14 *  @version $Revision: 1.114 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2006-11-17 22:06:57 $
    1616 *
    1717 *  Copyright (C) 2005-2006  Joshua Hoblitt, University of Hawaii
     
    788788}
    789789
     790psU64 psDBAffectedRows(psDB *dbh)
     791{
     792    PS_ASSERT_PTR_NON_NULL(dbh, (psU64)-1);
     793
     794    // mysql_affected_rows() returns (my_ulonglong)-1 on error
     795    return (psU64)mysql_affected_rows(dbh->mysql);
     796}
    790797
    791798// database utility functions
  • trunk/psLib/src/db/psDB.h

    r9990 r10044  
    1010 *  @author Joshua Hoblitt
    1111 *
    12  *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-11-15 01:34:42 $
     12 *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-11-17 22:06:57 $
    1414 *
    1515 *  Copyright 2005 Joshua Hoblitt, University of Hawaii
     
    437437);
    438438
     439/** The number of rows modified or inserted by the last query
     440 *
     441 *  This function returns ((psU64) - 1) on error
     442 *
     443 * @return psU64
     444 */
     445psU64 psDBAffectedRows(
     446    psDB *dbh                           ///< Database handle
     447);
    439448
    440449/// @}
Note: See TracChangeset for help on using the changeset viewer.