IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9030


Ignore:
Timestamp:
Sep 28, 2006, 1:21:33 PM (20 years ago)
Author:
jhoblitt
Message:

change p_psDBFetchResult() to return an empty array when the result set is empty

File:
1 edited

Legend:

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

    r8760 r9030  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.92 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2006-09-07 01:43:36 $
     14 *  @version $Revision: 1.93 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2006-09-28 23:21:33 $
    1616 *
    1717 *  Copyright (C) 2005-2006  Joshua Hoblitt, University of Hawaii
     
    959959    if (rowCount == 0) {
    960960        mysql_free_result(result);
    961         return NULL;
     961        // occording to popular opinion a query that succeeds but returns no
     962        // data should return an empty array -- this is somewhat inefficent -JH
     963        return psArrayAlloc(0);
    962964    }
    963965
Note: See TracChangeset for help on using the changeset viewer.