? src/db/.foo.txt.swp
? src/db/foo.txt
RCS file: /usr/local/cvs/repositories/pan-starrs/datasys/IPP/psLib/src/db/psDB.c,v
retrieving revision 1.45
diff -u -r1.45 psDB.c
|
|
|
|
| 307 | 307 | |
| 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 |
| 312 | 318 | // then reset n to 0 so elements are added from the beginning of |
| … |
… |
|
| 475 | 481 | } |
| 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 |
| 480 | 492 | // then reset n to 0 so elements are added from the beginning of |
| … |
… |
|
| 1257 | 1269 | psStringAppend(&query, "%s=%d", item->name, (int)(item->data.B)); |
| 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 { |
| 1263 | 1276 | // XXX ASC NOTE: we should have a better match for |