Changeset 6296 for trunk/psLib/src/db
- Timestamp:
- Feb 1, 2006, 6:48:47 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/db/psDB.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/db/psDB.c
r5841 r6296 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.4 5$ $Name: not supported by cvs2svn $15 * @date $Date: 200 5-12-24 00:33:15$14 * @version $Revision: 1.46 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2006-02-02 04:48:47 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 308 308 // Get number of rows returned in result 309 309 rowCount = mysql_num_rows(result); 310 // XXX has mysql's semantics changed? If this is zero then why was a 311 // result set returned? 312 if (!rowCount) { 313 mysql_free_result(result); 314 return NULL; 315 } 310 316 311 317 // pre-allocate enough elements to hold the complete result set … … 476 482 477 483 rowCount = mysql_num_rows(result); 484 // XXX has mysql's semantics changed? If this is zero then why was a 485 // result set returned? 486 if (rowCount == 0) { 487 mysql_free_result(result); 488 return NULL; 489 } 478 490 479 491 // pre-allocate enough elements to hold the complete result set … … 1258 1270 } else if (item->type == PS_DATA_STRING) { 1259 1271 // + column name + _ + like + _ + ' + value + ' 1260 if (*(char *)item->data.V == '\0') { 1272 // check for NULL and empty ("") strings 1273 if (item->data.V == NULL || *(char *)item->data.V == '\0') { 1261 1274 psStringAppend(&query, "%s IS NULL", item->name); 1262 1275 } else {
Note:
See TracChangeset
for help on using the changeset viewer.
