IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7050


Ignore:
Timestamp:
May 2, 2006, 4:35:37 PM (20 years ago)
Author:
Paul Price
Message:

Adding patch from Josh, which adds psDBLastInsertId

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

Legend:

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

    r6914 r7050  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2006-04-20 02:22:28 $
     14 *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2006-05-03 02:35:37 $
    1616 *
    1717 *  Copyright 2005 Joshua Hoblitt, University of Hawaii
     
    883883
    884884    return rows;
     885}
     886
     887long psDBLastInsertID(psDB *dbh)
     888{
     889    // XXX return type is actually my_ulonglong - should the return be psU64?
     890    return (long)mysql_insert_id(dbh->mysql);
    885891}
    886892
  • trunk/psLib/src/db/psDB.h

    r5136 r7050  
    1010 *  @author Joshua Hoblitt
    1111 *
    12  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-09-26 21:13:16 $
     12 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-05-03 02:35:37 $
    1414 *
    1515 *  Copyright 2005 Joshua Hoblitt, University of Hawaii
     
    275275);
    276276
     277/** Get the last insert ID
     278 *
     279 * Returns the value of MySQLs 'LAST_INSERT_ID()' function
     280 *
     281 * @return long:    The last insert ID
     282 */
     283long psDBLastInsertID(
     284    psDB *dbh                          ///< Database handle
     285);
     286
    277287/// @}
    278288
Note: See TracChangeset for help on using the changeset viewer.